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. Image for the cookie policy date

GridDataBoundGrid column auto-populate

Hello - I am evaluating the grid for use in our company and have what is probably a very basic question. When I set the DataSource on a databound grid to a table in a typed DataSet, I see, in design mode, columns corresponding to the columns in the table. When I run the form, the grid is populated correctly. The problem is, I want to change the header text of the bound columns to something more user-friendly than the db column names. To do this it seems I must edit the GridBoundColumns collection of the grid from scratch--since the initial bind did not create columns in this collection(?). Is it possible to automatically populate the bound column collection from the underlying datasource, and then just change the properties I want to on each column? This may seem trivial but it's an across the board requirement for us, and some grids will potentially have large numbers of columns. TIA, Eric Tanafon Charles River Development

1 Reply

AD Administrator Syncfusion Team May 30, 2003 10:37 AM

If you do not explicitly add GridBoundColumns, then the griddataboundgrid will populate the gridDataBoundGrid1.Binder.InternalColumns collection. You can access these columns to set the headertext and styleinfo property for a particular column without having to explicitly generate GridBoundColumns.

Loader.
Live Chat Icon For mobile
Up arrow icon