The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?????
BMBharath 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");