Home › Forums › WinForms controls › Xceed Grid for WinForms › Which is best to use? Unbounded or databound grid? › Reply To: Which is best to use? Unbounded or databound grid?
For managing the column, it is ok, but it means you must load the data manually in each row which can become cumbersome.
If you can bind direct to the DB via a DataSet generated by .NET, then you could simply use the Visible property on each column that is automatically generated by the gird, which is really the simplest way.
However, if you do not want to have all the unnecessary columns created, you can still bind the grid to the DataSet, and set the AutoCreateColumns property on the GridControl to false. Then provide only the columns you need through the use of the DataBoundColumn class. Just make sure to use the same name for the columns that are used in the DB when you instantiate them. All fields with no corresponding columns in the grid will NOT be created.
Imported from legacy forums. Posted by André (had 1862 views)