Telerik Forums
UI for WPF Forum
2 answers
2 views

Hello everybody,

in my WPF Application I am using Telerik's RadGridView. Everything is working fine so far.

But there is a little design issue, I am facing with.

In my App I am using Windows11Theme, if I use this, every row in my GridView is starting with a blue column. Sadly I am not able to find out, how to change this color.

Previously, I was using Windows8Theme and there I used "StrongColor" property to change this color. But I am not able to find out, how to change it in Windows11Theme.

Attached is an image, which shows the row, I want to change.

Thanks for your support.

BR,

Alex

Alexander
Top achievements
Rank 1
 answered on 06 May 2025
1 answer
8 views

1. Go to the GridView | Filtering Configuration example in the Telerik WPF Demo app.

2. Choose Popup for Filtering Mode.

3. Open filtering for Company Name.

4. Alt-Tab to another app window.

5. Observe as filter window appears on top of the app's window.

Is this expected behaviour?

Martin Ivanov
Telerik team
 answered on 29 Apr 2025
1 answer
24 views

When reading https://docs.telerik.com/devtools/wpf/controls/radgridview/hierarchical-gridview/self-referencing-grid I was expecting that `Self-Referencing` RadGridView means it uses own columns and rest visual stuff to display all nested child RadGridViews. Since it references the same type in the underlying data on every hierarchy level (that is self-referencing), it's obviously should display all levels in the same way (as it displays itself on top-level). 

Turned out it was not the case. Each child level requires own visual template, own columns with own styling. We have about 20 columns with heavy styling each (more than 500 lines in .xaml) for top-level `RadGridView`. Copy-pasting all that into `RadGridView.HierarchyChildTemplate` is not an option.

In your demo application, I saw that you add columns manually for a child `RadGridView` from `RadGridView1_DataLoading` handler in code-behind. I was hoping it was a mistake.

 

Martin Ivanov
Telerik team
 answered on 08 Apr 2025
1 answer
22 views

Hello,

In our app we are using filtering through a RadGridView bound to a QueryableCollectionView that wraps an ObservableCollection. Now I'm trying to use that filtered QueryableCollectionView as the ItemSource for a VisualizationLayer in a RadMap so that the filter on the grid also applies to items shown on the map, but the bind fails with the following error: "System.ArgumentException: 'Telerik.Windows.Data.QueryableCollectionView' is not a valid value for property 'Source'."

I've attached a quick project replicating the issue with the relevant code in MainWindow.xaml:

            <!-- Doesn't work -->
            <telerik:VisualizationLayer ItemsSource="{Binding ItemViewModelsView }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>
            
            <!-- Also doesn't work pulling directly from the GridView -->
            <telerik:VisualizationLayer ItemsSource="{Binding Items, ElementName=GridView }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>
            
            <!-- Works but isn't filtered -->
            <telerik:VisualizationLayer ItemsSource="{Binding ItemViewModels }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>

and the ViewModel:

public partial class MainWindowViewModel : ObservableObject
{
    [ObservableProperty] private ObservableCollection<ItemViewModel> _itemViewModels;
    public QueryableCollectionView ItemViewModelsView { get; private set; }
//...
}

It appears to me that the issue is because QueryableCollectionView is both an IEnumerable and a ICollectionView so when it tries to assign it to the MapItemsSource the CollectionViewSource.IsSourceValid() that's called during that assignment is returning false because it is an ICollectionView.

Is there a known workaround for this or suggested alternative to get the expected functionality?

Thanks!

Petar Mladenov
Telerik team
 answered on 26 Mar 2025
0 answers
25 views

RadGridView, for WPF .NET Framework 4.8, automatically hides rows that do not match the filter/search criteria after a row has been edited. How does one prevent the auto-filtering/searching?

A very important workflow for our customers is to search / filter for outliers and then edit the found rows. After they finish editing, they don't want the row to automatically disappear because of the search / filter doesn't match the row after the edits.

The customer only wants to search / filter if they actually initiated the action. They do not want auto searching and filtering.

Stephen
Top achievements
Rank 1
 asked on 24 Mar 2025
1 answer
30 views
Hello everyone!
I am using Telerik in my wpf app(.NET 8.0). There is a RadGridView and the selection mode is multiple. I have a Checkbox(GridViewSelectionColumn) in the first column. And in my model there is a field IsSelectable. now my question is, how can i make the Selection enabled or disabled according to this field? When the IsSelectable is False the whole row should be disabled to select. and vise versa. Here is my current code:
<!--  Main data grid  -->
<telerik:RadGridView
Name="GridView"
Grid.Row="1"
Margin="3"
DataContext="{Binding Requests}"
ItemsSource="{Binding}"
ShowGroupPanel="False"
SelectionMode="Multiple"
SelectionUnit="FullRow"

>
<telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn />

<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Id}" Header="{DynamicResource 100314}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Branch}" Header="{DynamicResource 100214}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=OperName}" Header="{DynamicResource 100315}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=OperRefer}" Header="{DynamicResource 100316}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CrtUsr}" Header="{DynamicResource 100317}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CrtDtm}" Header="{DynamicResource 100318}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SndUsr}" Header="{DynamicResource 100319}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SndDtm}" Header="{DynamicResource 100320}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Status}" Header="{DynamicResource 100242}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Remark}" Header="{DynamicResource 100114}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=RetCode}" Header="{DynamicResource 100321}" />
</telerik:RadGridView.Columns>

<telerik:EventToCommandBehavior.EventBindings>
<!-- Scroll event (RowLoaded) -->
<telerik:EventBinding
Command="{Binding DataContext.ScrollCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
EventName="RowLoaded"
PassEventArgsToCommand="True"
RaiseOnHandledEvents="True" />
</telerik:EventToCommandBehavior.EventBindings>

</telerik:RadGridView>
Stenly
Telerik team
 answered on 12 Mar 2025
1 answer
25 views

Hi,

I have a radgridview which I have configured to sort using "telerik.RadGridView.SortDescriptors" based on whether a checkbox is tick or untick. However, upon ticking/unticking the checkbox, the radgridview does not sort based on the condition that I have specified. May I ask for the solution for this?

Martin Ivanov
Telerik team
 answered on 11 Mar 2025
1 answer
22 views
Hi all

I have tried all sorts of ways (BindingProxy, Converters, DP Helpers..) but I can't seem to get it to work.

I have this:

  <telerik:GridViewDataColumn
      Header="Unit Cost"
      DataMemberBinding="{Binding UnitCost}"
      Style="{StaticResource Style.GridViewDataColumn.Currency}"
      Width="120" />

And the style (simplified) is this:

<Style
    x:Key="Style.GridViewDataColumn.Currency"
    TargetType="{x:Type telerik:GridViewDataColumn}">
    <Setter
        Property="DataFormatString"
        Value="N2" />

    <!-- Cell Template (Display Mode) -->
    <Setter
        Property="CellTemplate">
        <Setter.Value>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition
                            Width="Auto" />
                        <ColumnDefinition
                            Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock
                        Text="$"
                        VerticalAlignment="Center"
                        Margin="5,0" />
                    <TextBlock
                        Text="{Binding ??, StringFormat=N2}"
                        VerticalAlignment="Center"
                        HorizontalAlignment="Right"
                        Grid.Column="1" />
                </Grid>
            </DataTemplate>
        </Setter.Value>
    </Setter>

    <!-- Cell Edit Template -->
    <Setter
        Property="CellEditTemplate">
        <Setter.Value>
            <DataTemplate>
                <telerik:RadMaskedCurrencyInput
                    Value="{Binding Path=??, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                    IsTabStop="True" />
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>

How can I define the Path generically. If I hard code UnitCost it works, but I need it to be generic, and I can't find a way to do it.

PS: Design breif is that our company wants to display the $ sign on the left and the value aligned right.

Any insight would be welcomed greatly.
Stenly
Telerik team
 answered on 04 Mar 2025
0 answers
22 views

Hello, 

I use the Telerik TreeListView. I would like to implement auto resizing for the header cells. In my app, there is the possibility to change the language. Some of the header texts may be changed by this action.

If a text becomes longer after changing the language (e. g. the German word "Haus" is replaced by the English word "House"), the width of the column gets bigger. That means, auto resizing to a bigger width exists..

But after changing back to German (the header content becomes shorter), there is no auto resizing to a smaller width.

Is there an event I can check or a property for the TreeListView?

Thank you very much.

Best regards,

Alex

Alexander
Top achievements
Rank 1
 asked on 28 Feb 2025
1 answer
29 views

I found out that the ReadOnlyBackgroundBrush from Theme setting is not applied in GridView.

In some grid I have a whole column that should not be edited from the User, while some grid is only editable when the user has the right to do it and some rows are ReadOnly depending on the state of the Row.

Are there theme colors that are dedicated for GridView or is there a generic way to apply a color to GridView and it's cells/rows in ReadOnly state? 

Stenly
Telerik team
 answered on 24 Feb 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?