Telerik Forums
UI for WinUI Forum
1 answer
77 views

Hello,

I have a RadDatagrid with more columns and I would like to use sorting functionality by clicking on column headers as it is implemented. Is it possible for some text columns to define own comparer. I need to compare strings "naturally" like: "Ring 1", "Ring 2", Ring 10", "Ring 11",...

Thank you,

 

Pavel

Martin Ivanov
Telerik team
 answered on 12 Dec 2024
1 answer
59 views
I was wondering if there was a way to retrieve RadDataGrid filtered information, such as the column header or mapping name and what was selected in the DistinctValuesFilterDescriptor? I'm trying to create separate controls above the RadDataGrid that will show applied filters and a clear filters button.

Any help would be appreciated!
Stenly
Telerik team
 updated answer on 20 Nov 2024
1 answer
95 views

Hey,

i'm prototyping a WinUI3 App and have a Page with a Grid.
I'm using the RadDataGrid. Now I want to make the columns resizable by the users but the only easy way I found was via the "ResizeHandle" that appears with the setting ColumnResizeHandleDisplayMode="Always".

Is it not possible to just click between Column Headers and resize the columns? Is there a simple solution I'm missing or do I actually have to fiddle around with control templates?

Kind regards,
Christoph

Martin Ivanov
Telerik team
 answered on 30 Oct 2024
1 answer
97 views

Is it possible to introduce scrollability to the RadDataGrid?

 

Are WinUI3 Components meant to be responsive to the window dimensions?

Martin Ivanov
Telerik team
 answered on 04 Sep 2024
1 answer
87 views

I'm evaluating Telerik's UI for WinUI and simply don't have the knowledge nor the time to learn the DataGrid thoroughly.  I have to make a decision between Telerik and a competitor very soon.

The question is about filtering.  I like the filtering in the Telerik grid, with the funnel icon.  However, my client is familiar with a different experience, and prefers it.  Specifically, the client would like a line either between the column headers and the data where the user could simply type and the grid would automatically filter using a "contains" (simple concept, but not so easy for me to describe).  Is that something that could be done with Telerik's grid?  Can it be done with configuration, or would it require custom coding?  Ideally I'd love to see an example (GitHub)?

Thanks in advance.

Martin Ivanov
Telerik team
 answered on 20 Aug 2024
0 answers
64 views

I have the datagrid UserEditMode set to "External", and somehow it keeps showing the inline edit mode/box. This happens as soon as I programmatically adda new item to the collection. Is there a way to stop this from happening? I'm looking for a way to hide that blue box and to just programmatically save the changes in the item as soon as any of the cells loses focus:

<telerikGrid:RadDataGrid ItemsSource="{x:Bind ViewModel.Parameters, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="False" UserEditMode="External" CanUserChooseColumns="False" UserFilterMode="Disabled" UserGroupMode="Disabled" UserSortMode="None">
    <telerikGrid:RadDataGrid.Columns>
        <telerikGrid:DataGridTextColumn PropertyName="Key" Header="Parameter"/>
        <telerikGrid:DataGridTextColumn PropertyName="Value" Header="Value"/>
        <telerikGrid:DataGridTextColumn PropertyName="Description" Header="Description"/>
    </telerikGrid:RadDataGrid.Columns>
</telerikGrid:RadDataGrid>


using System.Collections.ObjectModel;
using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;

namespace App1.ViewModels;

public partial class MainViewModel : ObservableObject
{
    [ObservableProperty]
    public string? name;

    [ObservableProperty]
    public ObservableCollection<ParameterViewModel> parameters;

    public MainViewModel()
    {
        Parameters = new ObservableCollection<ParameterViewModel>();
        this.AddNewParameter();
    }    

    private void Parameter_PropertyChanged(object? sender, PropertyChangedEventArgs e)
    {
        var item = sender as ParameterViewModel;
        if (item is not null)
        {
            var index = Parameters.IndexOf(item);
            if (index == Parameters.Count - 1)
                AddNewParameter();
        }
    }

    public void AddNewParameter()
    {
        var Parameter = new ParameterViewModel() { Key = "", Value = "", Description = "" };
        Parameter.PropertyChanged += Parameter_PropertyChanged;
        Parameters.Add(Parameter);
    }
}
public partial class ParameterViewModel : ObservableRecipient
{
    [ObservableProperty]
    public string? key;
    [ObservableProperty]
    public string? value;
    [ObservableProperty]
    public string? description;
}

Carlos
Top achievements
Rank 1
 asked on 12 Jul 2024
0 answers
135 views

We use only nested properties in and we whould like to have the same width of name column like group is it somehow possible to do it?

in the picture is group "Expand this group" and property with nested properties "Expand this nested object" where we do not care about value but want to span the columns to one to look similar like group "Expand this group".

 

Pavel
Top achievements
Rank 1
 asked on 03 Jul 2024
1 answer
101 views

Hi,

I would like to use SelectionMode="Extended" for my DataGrid and still be able to navigate through/select rows with arrow keys. Setting IsSynchronizedWithCurrentItem="True", however, disables multiselection. Is there a way to combine the two behaviors?

Thanks for your help

Regards

Simon

Stenly
Telerik team
 answered on 15 Mar 2024
1 answer
79 views

I have simple datagrid with numerical columns and when I switch on column filter dialog it is impossible to enter values over 100 or below 0. It looks like that RadNumericBox is limited to range <0,100>. I am able to disable distinct values but nothing else.

For example:


    <telerikgrid:RadDataGrid x:Name="MeasuredProfilesDataGrid" ItemsSource="{x:Bind ViewModel.Points}" AutoGenerateColumns="False" SelectionMode="Extended" SelectionUnit="Row" UserGroupMode="Disabled" UserEditMode="Inline">

        <telerikgrid:RadDataGrid.Columns>
            <telerikgrid:DataGridNumericalColumn PropertyName="StationingUserValue" Header="{x:Bind HeaderViewModel.StationingHeader}" CellContentFormat="{x:Bind HeaderViewModel.StationingFormatString}" ShowDistinctValuesFilter="False"/>
            <telerikgrid:DataGridNumericalColumn PropertyName="OffsetXUserValue" Header="{x:Bind HeaderViewModel.OffsetXHeader}" CellContentFormat="{x:Bind HeaderViewModel.LocalDistanceFormatString}" ShowDistinctValuesFilter="False"/>
            <telerikgrid:DataGridNumericalColumn PropertyName="OffsetYUserValue" Header="{x:Bind HeaderViewModel.OffsetYHeader}" CellContentFormat="{x:Bind HeaderViewModel.LocalDistanceFormatString}" ShowDistinctValuesFilter="False"/>
            <telerikgrid:DataGridNumericalColumn PropertyName="EastingUserValue" Header="{x:Bind HeaderViewModel.EastingHeader}" CellContentFormat="{x:Bind HeaderViewModel.ENHFormatString}" ShowDistinctValuesFilter="False"/>
            <telerikgrid:DataGridNumericalColumn PropertyName="NorthingUserValue" Header="{x:Bind HeaderViewModel.NorthingHeader}" CellContentFormat="{x:Bind HeaderViewModel.ENHFormatString}" ShowDistinctValuesFilter="False"/>
            <telerikgrid:DataGridNumericalColumn PropertyName="HeightUserValue" Header="{x:Bind HeaderViewModel.HeightHeader}" CellContentFormat="{x:Bind HeaderViewModel.ENHFormatString}" ShowDistinctValuesFilter="False"/>
        </telerikgrid:RadDataGrid.Columns>
    </telerikgrid:RadDataGrid>

Martin Ivanov
Telerik team
 answered on 15 Feb 2024
1 answer
103 views
Grouping a DataGrid is not what I'm looking for.
Martin Ivanov
Telerik team
 answered on 30 Oct 2023
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?