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

GridDataBoundGrid column auto-populate

Thread ID:





4770 May 30,2003 12:28 PM UTC May 30,2003 02:37 PM UTC WinForms 1
Tags: GridControl
Eric Tanafon
Asked On May 30, 2003 12:28 PM UTC

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

Administrator [Syncfusion]
Replied On May 30, 2003 02:37 PM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon