Telerik Forums
UI for WPF Forum
1 answer
22 views

I've read this thread but it is a bit confusing and old: Live sorting/grouping in UI for WPF | Telerik Forums

What is the current situation?

I am having problems with Devexpress GridControl as they dont support what they call "Live Data Shaping" eg sorting with real-time updates IF you use WPF binding.

Question - can Telerik data grid and/or virtual grid do live data shaping where columns use custom templates with WPF binding to a dictionary. For example: `{Binding Fields[abc].Value}`?

Martin Ivanov
Telerik team
 answered on 11 Mar 2024
0 answers
34 views

Hello, 

I am using a RadTreeView component in a WPF application that looks like in the following photo. The hierarchy is: a Category can contain a list of SubCategories and a SubCategory contains a List of Activities that have some properties. I would like to transform my RadTreeView into a RadTreeListView or RadGridVew in order to beneficiate from SelectionUnit property and the navigation between cells from the keyboard but I could not find anything that meets by needs:

a component with cells only on the last level of the hierarchy, to be able to select a cell and edit it  and, if possible, to have a tabular header with details from the last level of the hirarchy.

 

Thank you!

Andreea
Top achievements
Rank 1
Iron
 updated question on 08 Feb 2024
0 answers
26 views

Hi,

I am using <telerik:RadTreeListView> and the scroll functionality does not work. this is how my code looks like:

<UserControl x:Class="WISN.Windows.Survey.FacilityStaffControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:WISN.Windows.Survey.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <telerik:RadTreeListView x:Name="stufftreeListView" AutoGenerateColumns="False"
                                 AutoExpandItems="True" GroupRenderMode="Flat" CanUserDeleteRows="False"
                                 ItemsSource="{Binding AllStaffByType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged }">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding StaffCategories,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></telerik:TreeListViewTableDefinition>
            </telerik:RadTreeListView.ChildTableDefinitions>

            <telerik:RadTreeListView.Columns>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" AutoSelectOnEdit="True" EditTriggers="CellClick">
                    <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding CustomCommandCommand}" EventName="MouseLeftButtonDown" />
                    </telerik:EventToCommandBehavior.EventBindings>
                </telerik:GridViewCheckBoxColumn>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Stuff"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding AnnualSalary}" Header="Annual Salary"></telerik:GridViewDataColumn>
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
</UserControl>

 

I really do not know how to fix it.

Thanks

Andreea
Top achievements
Rank 1
Iron
 asked on 16 Jan 2024
1 answer
34 views

I just started WPF trial. I need help though. I am going to have large grids (10Ks rows x 100 columns) with frequent update of certain cells (100s upd/sec).

I am not sure I can use your virtual grid - need more time to understand what are the drawbacks.

So I use RadGridView (see below - this is not final version - just a first try - what I quickly read in your article on making grid more performant).

Columns are made in C# and bound to dictionaries using string key like: `Binding("f[NAME].Value")` where `Value` is of type object (this is best I can do - dont ask - a requirement i cannot circumvent)

Now, what is my question here - when I load grid with data initially - most of the values in cells arent available yet. I am asked to display something to highlight that state. Also sometime some rows might get unavailable in the middle of use. But bottom line - these "unavailable" cues are going to live may be 0.5% of the grid life-time..

I dont want to write cell templates that will lengthen the visual tree and  make grid slow for something that i need for very short period of time.. 

Is there a way to optimise it?

One theory - add something to the visual tree in the beginning and then take it away.. (like walking visual tree manually and inserting a semi-transparent red border or something like that? or changing template of rows, that have became available, into lightweight ones). Concern here - binding might get broken after manipulation with visual tree..

Or I can set all the values to a string like "N/A". However concern here is that what happens with the columns types in this case? Wont this screw the grid ability to sort/filter - because columns will pick up initial "string" type and later, when I change it to real data, (can be date/number/etc) - they break down completely.

Can I set columns type explicitely after N/A disappeared (however not clear - N/A might stay in some rows longer than in others and few could be N/A for lot longer)...

Any trick you can recommend?

NOTE: the same question applies on tree view (even more so)

 

<telerik:RadGridView x:Name="dg" ItemsSource="{Binding data}" ValidatesOnDataErrors="InEditMode" IsPropertyChangedAggregationEnabled="False" GroupRenderMode="Flat" ShowGroupPanel="False"AutoGenerateColumns="False"CanUserFreezeColumns="False"RowIndicatorVisibility="Collapsed"CanUserResizeColumns="False">

Martin Ivanov
Telerik team
 answered on 08 Dec 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?