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.

collection of columnnames

Thread ID:

Created:

Updated:

Platform:

Replies:

63173 Jun 28,2007 08:41 PM Jun 29,2007 10:42 AM Windows Forms 1
loading
Tags: GridControl
John
Asked On June 28, 2007 08:41 PM


Hi,

Is there a way to get a collection of all of the columnnames in a databoundgrid whether they are shown or not?

I tried using these two functions, but they seem to only contain the columns that are currently shown in the databoundgrid. Thanks!

gridDataboundGrid.Binder.GridBoundColumns[i].MappingName;
gridDataboundGrid.Binder.InternalColumns[i].MappingName;

haneefm [Syncfusion]
Replied On June 29, 2007 10:42 AM

Hi Code12345,

Is there a way to get a collection of all of the columnnames in a databoundgrid whether they are shown or not?
>>>>>>>>
You can try these code:

CurrencyManager cm = (CurrencyManager) this.BindingContext[this.gridDataBoundGrid1.DataSource, this.gridDataBoundGrid1.DataMember];

PropertyDescriptorCollection pdc = cm.GetItemProperties();
foreach (PropertyDescriptor pd in pdc)

{
Console.Writeline( pd.Name);
}

Best regards,
Haneef

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.

;