Name of a GridBoundColumn

Hi, How do I get column name of a GridBoundColumn in prepareviewstyleinfo event? This name is the name of column not the mapping name. VS

3 Replies

AD Administrator Syncfusion Team November 18, 2005 01:33 AM UTC

Try: int field = grid.Binder.ColIndexToField(e.ColIndex); string name = grid.GridBoundColumns[field].MappingName; If you did not add GridBoundColumns, then use grid.Binder.InternalColumns instead of grid.GridBoundColumns.


AD Administrator Syncfusion Team November 18, 2005 06:42 AM UTC

I have to use grid.Binder.InternalColumns but it is not working. I am dispalying rows in parent-child view. # columns in parent datatable doesn''t match with #columns in child datatable. whenever i use grid.Binder.InternalColumns, it always give me columns from parent datatable. somehow i need the internalcolumns from child mapping. Please help!


AD Administrator Syncfusion Team November 18, 2005 10:07 AM UTC

For a hierarchical grid, you need to access the hierarchylevel to get the proper information. See this forum thread. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=27227

Loader.
Up arrow icon