Telerik Forums
UI for WPF Forum
10 answers
141 views

Hello,

I have a .NET Core WPF application with the following statement as the first statement of the application:

RadRibbonWindow.IsWindowsThemeEnabled = false;

 

(without this statement, the display is ugly when the application is in full screen, as you can see in your own Report Designer...)

The problem is that, when the application is in full screen mode, it seems that the ribbon is too wide: the first icon at left is near the window edge and the minimize button at the right is partially hidden.

This doesn't appear with the Office2013 theme.

 

Vladimir Stoyanov
Telerik team
 answered on 10 Jun 2020
0 answers
148 views

I have created a radcombobox inside my radgridview and bound some text to it which works fine, but I can't seem to get it to update the database for the selected row when I change the selection of the combo box?

 

My XAML:

<telerik:GridViewDataColumn Header="Produktgruppe" Width="Auto" MinWidth="180" IsReadOnly="True">
                    <telerik:GridViewDataColumn.CellStyle>
                        <Style TargetType="{x:Type telerik:GridViewCell}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type telerik:GridViewCell}">
                                        <telerik:RadComboBox ItemsSource="{Binding Source={StaticResource ViewModelProductGroups}, Path=ProductGroups}"
                                                             DisplayMemberPath="Name"
                                                             IsEditable="True"
                                                             IsReadOnly="True"
                                                             SelectedIndex="0"
                                                             EmptyText="Vælg produktgruppe"/>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </telerik:GridViewDataColumn.CellStyle>
                </telerik:GridViewDataColumn>

 

My code-behind:

public Products()
        {
            InitializeComponent();
        }
 
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            using (Context dbContext = new Context())
            {
                GvProducts.ItemsSource = dbContext.Product.Include(x => x.ProductGroup).ToList();
            }
        }
 
        private void GvProducts_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
        {
            if (e.NewData is Models.Product editedProduct)
            {
                using (Context dbContext = new Context())
                {
                    dbContext.Entry(editedProduct).State = EntityState.Modified;
                    dbContext.SaveChanges();
                }
            }
        }

 

My view model

sdf

public ObservableCollection<Models.ProductGroup> ProductGroups { get; set; }
        public ViewModelProductGroups()
        {
            using (Context dbContext = new Context())
            {
                ProductGroups = new ObservableCollection<Models.ProductGroup>(dbContext.ProductGroup.ToList());
            }
        }

 

Any suggestions?

Martin
Top achievements
Rank 1
Veteran
 asked on 10 Jun 2020
2 answers
415 views

I have a weird problem with a RadWIndow that is to replace the regular Window.

It's showing inside what appears to be a browser and I have no idea how to fix this.

 

Any ideas?

 

MainWindow.xaml

<telerik:RadWindow x:Class="TelerikWpfApp1.MainWindow"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   Width="1200" Height="850" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" MinWidth="1200" MinHeight="850" CaptionHeight="25" IsRestricted="True">
    <telerik:RadWindow.Resources>
        <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" />
        <telerik:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
        <Style x:Key="ItemPreviewStyle" TargetType="telerik:RadNavigationViewItem">
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ItemBaseStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource ItemPreviewStyle}">
            <Setter Property="Content" Value="{Binding Title}" />
            <Setter Property="ItemsSource" Value="{Binding SubItems}"/>
            <Setter Property="Icon" Value="{Binding Icon}" />
            <Setter Property="IconVisibility" Value="{Binding Icon, Converter={StaticResource NullToVisibilityConverter}}"/>
        </Style>
        <Style x:Key="ItemStyle" TargetType="telerik:RadNavigationViewItem" BasedOn="{StaticResource ItemBaseStyle}">
            <Setter Property="ItemContainerStyle" Value="{StaticResource ItemBaseStyle}"/>
        </Style>
    </telerik:RadWindow.Resources>
    <telerik:RadNavigationView x:Name="NavigationView" ItemsSource="{Binding Items}"
                               ItemContainerStyle="{StaticResource ItemStyle}"
                               AutoChangeDisplayMode="True"
                               DisplayMode="Expanded"
                               AllowMultipleExpandedItems="True"
                               SubItemsIndentation="40"
                               telerik:AnimationManager.IsAnimationEnabled="True"
                               Loaded="OnNavigationViewLoaded"
                               SelectionChanged="OnNavigationViewSelectionChanged">
        <Frame x:Name="frm"/>
    </telerik:RadNavigationView>
</telerik:RadWindow>

Martin
Top achievements
Rank 1
Veteran
 answered on 10 Jun 2020
5 answers
326 views
hi,
          I want to create password box inside rad grid view.it will display value from database to rad grid.also add grid to database.
that is two way binding.pls attach sample code. i already waste more time for searching.
Martin Ivanov
Telerik team
 answered on 09 Jun 2020
7 answers
171 views

Hello,

We're working on a WPF application that use Telerik wpf UI component version 2012.1.0326.40. 

So we wonder if you could easily upgrade to the lastest  WPF version?

Regards 

Yoan
Telerik team
 answered on 09 Jun 2020
4 answers
783 views

Hello,

I have a RadGridVeiw table with some values, i need to update certain cell values when the user clicks a button.

So far i have:

 

var column = TableGridView.CurrentCell.Column;
 
TableGridView.BeginEdit();
TableGridView.CurrentCell.Value = "test";
TableGridView.Rebind();

 

The value is updated in terms of code, but visually my Radgridview displays the old value.

 

can anyone help me?

 

 

Vadim
Top achievements
Rank 1
Veteran
 answered on 09 Jun 2020
2 answers
83 views

I have followed the advice on this forum post below by adding and removing a dummy object in my collection.

https://www.telerik.com/forums/force-filtering-to-refresh-when-values-in-existing-rows-are-updated#wbilJhXXv02aibtG_c5tTQ

This will force a RadGrid to show data that meets the filters criteria after the filter has been applied.

Unfortunately this breaks my cell flashing user control, which relies upon FrameworkElement.IsLoaded being true but is always false when doing the suggested fix from the forum post.

This is because the user control now being instantiated in CreateCellElement on each update rather than being reused.

How can I send a sample project? You can see when you run the solution, if you filter on the InAuction column and set it to true, you will see the rows being added but no cell flashing for the StockPrice column.

How can I fix the issue?

Martin Ivanov
Telerik team
 answered on 08 Jun 2020
5 answers
311 views
I have a couple Boolean properties on my object that by default are being rendered as Check Boxes.  I have put a Data Template Selector class in place to provide a new template that uses a simple TextBlock.  The problem is instead of the TextBlock showing True or False (which it does by default) I want it to show Yes or No.  So I also created a simple class that implements IValueConverter to change Booleans to Yes or No.  Because I have multiple similar properties I want to reuse the same data template.

<utils:PropertyEditorTemplateSelector.YesNoTemplate>
   <DataTemplate>
      <TextBlock telerik:AutoBindBehavior.UpdateBindingOnElementLoaded="Text" Text="{Binding Converter={StaticResource YesNo}}" />
   </DataTemplate>
</utils:PropertyEditorTemplateSelector.YesNoTemplate>

I thought using the AutoBindBehavior would do the trick (and it might I could be using it wrong) but when my value converter is called I am passed the Parent object and not just the value of the property being rendered. 
I have a feeling my Binding expression for my Text property on the data template is wrong but I am unable to figure out the proper value.

Thanks.
Martin Ivanov
Telerik team
 answered on 08 Jun 2020
5 answers
239 views

hi my friends

I wanna to use radcombobox in editable mode to search with two key words

by employee id and employee name

for each key word I wanna to show employee name in radcombobox

example:

table from database

id             name

----           ---------

10            jack

20            ali

30            dany

search by employee id like picture 1.

search by employee name like picture 2.

 

Don
Top achievements
Rank 1
 answered on 05 Jun 2020
1 answer
195 views

Hello,

 

I'm working in an application with the RadGantView. We are using maybe in a special way by puttin multiple event on a same row playing with margins to avoid overlap.

As a result I written a visualization behavior to yield right elements and container selector.

 

That's for the context. Now I'm facing an issue with refresh of the gantt timeline. I can't figure out why it doesn't update after effective changes.

I attach a little gif of the visual I have for now and we can notice that is does not update when wanted. Note that after some wierd manipulation in the application the timeline finally gets updated with the right position.

 

Thanks by advance.

 

Cheers,

Alexandre

Alexandre
Top achievements
Rank 1
 answered on 05 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?