This is a migrated thread and some comments may be shown as answers.

GridView with Row Headers

1 Answer 134 Views
GridView
This is a migrated thread and some comments may be shown as answers.
raido
Top achievements
Rank 1
raido asked on 16 Mar 2017, 05:42 PM

Hello,

I want to achieve this : (see attached file for mockup)

           GR01      GR02      GR03     ... ... ...
ErgoLimit1 |    1    |    3    |    5    |
ErgoLimit2 |    3    |    2    |    1    |

 

This is basically a grid with row headers.

My ItemsSource is an ObservableCollection of :

1.public class MyDataSourceLine
2.{
3.    public string GroupName { get; set; }
4.    public int ErgoLimit1Value { get; set; }
5.    public int ErgoLimit2Value { get; set; }
6.}

 

I tried using RadGridView but does not look like a good fit  as there are no way (correct me if i'm wrong) to set row headers.

Cells must be editable (at least for the rows ErgoLimit1 and ErgoLimit2)

Columns are not fixed : every MyDataSourceLine should add a column.

Appreciate help on this as I spent already a lot of time trying to figure out how do to this, in vain :(

If it's not possible with RadGridView, i can change to another telerik control.

Thanks in advance !

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 21 Mar 2017, 12:45 PM
Hello,

I'm afraid that such behavior is not currently supported by RadGridView and cannot be mimicked by any of the other Telerik controls.

There is, however, a feature request in our feedback portal regarding such functionality for which you can vote here.

What I can suggest for the time being is to create another property of your business objects (MinValue for example) and in its getter return the smaller of the two values. You can then bind that to a new fourth column of your RadGridView and display the items horizontally rather than vertically. Here's what I have in mind:

<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding GroupName}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding ErgoLimit1Value}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding ErgoLimit2Value}"/>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding MinValue}"/>
</telerik:RadGridView.Columns>

I hope you find such an approach applicable.

Regards,
Dilyan Traykov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
raido
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or