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.
Unfortunately, activation email could not send to your email. Please try again.

Client Side Paging Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

96714 Sep 30,2010 04:04 AM Oct 1,2010 04:55 AM Windows Forms 1
loading
Tags: GridControl
Narasimha Pavan
Asked On September 30, 2010 04:04 AM

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


Bharath M [Syncfusion]
Replied On October 1, 2010 04:55 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;