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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to make Data-Bound Grid show the Component Name for each row?

Thread ID:

Created:

Updated:

Platform:

Replies:

38932 Dec 21,2005 01:28 PM UTC Dec 22,2005 09:50 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 21, 2005 01:28 PM UTC

I am evaluating the Syncfusion data-bound grid. My data to be bound is a list of objects that implement the ICustomTypeDescriptor interface. The properties that they expose get shown in the column headers but the grid ignores the component name returned from ICustomTypeDescriptor.GetComponentName that I would expect to be shown in the row header. How do I get the grid to put each row''s component name in the row headers?

Administrator [Syncfusion]
Replied On December 22, 2005 09:50 AM UTC

Hi NGP, Thanks for evaluating Syncfusion Grid. You can dynamically set the rowheader''s text with the component name by handling the Grid.Model.QueryCellInfo event to see if that helps. this.gridDataBoundGrid1.Model.QueryCellInfo +=new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(Model_QueryCellInfo); private void Model_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e) { if( e.RowIndex > 0 && e.ColIndex == 0 && this.gridDataBoundGrid1.DataSource != null) { BindableObject b = (BindableObject)Books[e.RowIndex - 1]; e.Style.CellType = "Header"; e.Style.Text = TypeDescriptor.GetComponentName(b,true); e.Handled = true; } } Here is a sample. Best regards, Jay

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.

Warning Icon 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.Close Icon

;