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

How to display GroupDetails and different Row Types

5 Answers 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
nduru
Top achievements
Rank 1
nduru asked on 18 Nov 2010, 12:06 PM
I am displaying a large amount of timestamped data on a WPF RadGridView that has two levels of grouping.
The two indexed fields used for grouping refer to two other classes of object.
I have a value convertor that allows me to display the name field of the group object on the group header
That works very well.

I now have two needs:

1. What I would really like is that when a group header is selected a 'GroupDetail' section would expand
in the same fashion as a RowDetail so that I can display the fields of the grouping object.

2. Within my data I have some rows that are blank except for the time and an index to an event object 

DataTable

time       event   data_0 ... data_n

t0             0           x0             xn

t1             0           y0            yn

t2             e1        nul           nul

t3             0           z0            zn

The event class has different subclasses, They all have a string field but may have different sets of data fields.

I would like to be able to display each event object as a row displaying its string field on a single wide cell, like a group header without the expander.  The RowDetails for that row could then ask the event object to display its particular fields.

Thanks

5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 Nov 2010, 05:03 PM
Hello,

1. Currently, we do not have a feature like "Group Row Details".

2. To do that, you can override the ToString method of the event class to return this string representation.
Then add only a single column to the grid and bind it to the entire object, instead of a particular property. This will call its ToString and display it in the single column that you have.

I hope this helps.

All the best,
Ross
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
nduru
Top achievements
Rank 1
answered on 22 Nov 2010, 08:14 AM

Thanks Ross,

My problem is that I can already display all the information for an event in a single column, but it is very long and the grid is already very densly packed.

I really need it to display as a single cell for the whole row.

Is that possible?

If so how to do so in code?

0
Rossen Hristov
Telerik team
answered on 22 Nov 2010, 09:48 AM
Hi nduru,

It is possible and I have explained this in my previous post. Simply add a single column to the grid and configure its DataMemberBinding to point to ".", which means the entire business object. Then override the ToString method of your business object to return what you would like to see in this single column.

I have attached a sample project that does this. I hope it helps.

Greetings,
Ross
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
nduru
Top achievements
Rank 1
answered on 23 Nov 2010, 12:45 AM

Hi Ross

Thanks very much for your quick response.

I might have misunderstood what you have sent, but I can't see how that would solve my problem.

I have enclosed a jpg of what I am getting at, as it might help explain it better

.

We have maybe 50 columns of densely packed data over thousands of rows. We are trying to have as many columns 

as we can on the screen so as to avoid or minimise horizontal scrolling.

Interspersed in that data are several classes of event  

from simple alarms to events that set a large number of parameters.

We can make a string from the data for those events as you suggest, 

but if I have to display it in a single column it pushes many or all of the other columns off the screen.

Nduru

0
Rossen Hristov
Telerik team
answered on 23 Nov 2010, 10:13 AM
Hi nduru,

Now I understand what you are trying to do. Unfortunately, that would be impossible. You might want to look for some kind of a spreadsheet component instead of a grid.

Best wishes,
Ross
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
General Discussions
Asked by
nduru
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
nduru
Top achievements
Rank 1
Share this question
or