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

New to Syncfusion, couple of questions.

I am new to the syncfusion controls, and wanted some quick general direction to help me resolve a couple of development issues so I can convince my boss to buy this control set.
I like the flexibility of the grid, and it seems to be able to do what I need it to, Again just a few quick quesitons.

I am building a grid on the fly at run time based on a Dataset I have returned from a stored procedure with structure information in it. I add Rows and Columns, and I am currently using just the Grid control. I loop through rows and columns I have then added and add a Label value to the first column, and then a data or cell type to the column next to the label column, so that my rows are really Rows of
|Label|CellType|Label|CellType|Label|CellType|

I need to be able to merge columns on a row by row basis. Is this possible? I have a "Note:" field that I need to merge several columns and then add a Rich text editor. Again is column merging available, and a VB sample of it would be awesome.

Second I need to group by the first column, but values are not repeated but occur only once. So my grid looks like this:

|NodeName |Label|CellType|Label|CellType|
| |Label|CellType|Label|CellType|
| |Label|CellType|Label|CellType|
|NodeName2|Label|CellType|Label|CellType|

Where I can group by the first Column. Can I do this in a regular grid, because I do not want the end user to have the option to set this, but I want the + - icons next to Node Name and to show or hide the "child Rows", but again these are not really child rows of data, but structure.

Now once I get through building the grid I then loop through the 30 Label|CellType columns and add the data to the correct cell.

Should I use the gridGroupingControl to achieve this? or in your opinion write my own procedures to show or hide child rows just based on a button click I put in my grid? I know this is long and probably not a clear explanation, but in a nut shell the easiest way to group by and is column merging supported with some sample code to merge columns and headers would be awesome. Thanks.

1 Reply

BM Bharath M Syncfusion Team March 22, 2010 08:17 PM UTC

Hi George,

Thank you for your interest in Syncfusion products.

1. Need to be able to merge columns on a row by row basis

We can able to merge the row cells in GridGroupingControl through QueryCoveredRange event. Please refer the below online sample to illustrate row by row cell merging.

http://samples.syncfusion.com/ASPNET/8.1.0.30/Web/Grid.Grouping.Web/samples/3.5/MergedRows/CellMerging/cs/cellmerging.aspx

2. Where I can group by the first Column

We suggest you use the below code snippet to do first column grouped.


// for Grouping first column
GridGroupingControl1.TableDescriptor.GroupedColumns.Add(GridGroupingControl1.TableDescriptor.Columns[0].Name);

// for Hiding GroupDropArea
GridGroupingControl1.ShowGroupDropArea = false;

For grouping sample, please refer our online sample.
http://samples.syncfusion.com/ASPNET/8.1.0.30/Web/Grid.Grouping.Web/samples/3.5/SortingandGrouping/BasicGrouping/cs/GroupingBasic.aspx

To get a customized samples, we suggest you to create a DirectTrac incident.

Let me know if you have any concerns.

Regards,
Bharath

Loader.
Live Chat Icon For mobile
Up arrow icon