We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Grid Grouping and Virtual Events/Custom Data

G'day,

I have a custom data object that I want to show in a grouping control. The data object has a set of columns, a set of row headers, and a list of lists of cells. The user can set up the columns they want to show - these can show data from the cells, or show data from the row headers. Basically I want to be able to group on at least the columns showing data from the row headers, and preferably on any column.

So in the data we might have:

Col1, Col2, Col3, Col4
RowHeader1, Cell1, Cell2, Cell3, Cell4
RowHeader2, Cell5, Cell6, Cell7, Cell8

And the row header might have something like Group, and RowName. The view then might have something like:

Group, RowName, Col1, Col2
Group1, RowName1, Cell1, Cell2
Group1, RowName2, Cell5, Cell6

So the view only shows data from columns the user sets up. In this case I want them to be able to group on the "Group" column in the view.

I was hoping that there would be some kind of virtual query events I could hook up to like with the normal grid control.

Anyway, if anyone has any ideas, it would be most appreciated.

Cheers,
TERRY

1 Reply

RR Ramya R Syncfusion Team August 22, 2007 05:42 AM UTC

Hi Terry,

Thank you for interest in Syncfusion Products.

I have created a sample using the structure provided by you and have attached the same here.

It is not possible to group the headers of the grid, only columns can be grouped.

If your intention is to make the Column "Group" have a look like header then it can be done by setting the celltype of particular column to "Header" as shown in the code snippet below,
this.gridGroupingControl1.TableDescriptor.Columns[0].Appearance.AnyRecordFieldCell.CellType = "Header";

You can download the sample from the link given below,
http://websamples.syncfusion.com/samples/Grid.Windows/F67458/main.htm

Kindly take a look at the attached sample and let me know whether this helps you.

Also please let me know if you have any queries.

Thanks & Regards,
Ramya.

Loader.
Live Chat Icon For mobile
Up arrow icon