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

Client Side Paging Grid

Hi

I am binding a cspg with a list of entity and the entity has another list of entity(child list) , so there are childsrecords for each record in the grid. My Problem is I have to show only few child columns from the the child list.

Can you please tell me how to access(means adding columns/removingetc) the child columns/records for each record?????

Regards,
Pavan


1 Reply

BM Bharath M Syncfusion Team October 1, 2010 08:55 AM UTC

Hi Pavan,

Thank you for your interest in Syncfusion products.

We can control the child table’s column’s visibility with the help of “VisibleColumns” collection of ChildTableDescriptor. Please refer the below code snippet to get the “ChildTableDescriptor” and do processing on it

[CS]

this.GridGroupingControl1.DataBind();
GridTableDescriptor childTableDescriptor = this.GridGroupingControl1.TableDescriptor.Relations[0].ChildTableDescriptor as GridTableDescriptor;
// To add unbound columns to grid
childTableDescriptor.Columns.Add("UnboundColumName1");
childTableDescriptor.Columns.GetColumnDescriptor("UnboundColumName1").ItemTemplate = new ButtonTemplateClass();

// To remove columns from visibility
childTableDescriptor.VisibleColumns.Remove("desiredChildTableColumnName1");
childTableDescriptor.VisibleColumns.Remove("desiredChildTableColumnName2");


Let me know if you have any concerns.

Regards,
Bharath M



Loader.
Live Chat Icon For mobile
Up arrow icon