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

GridBoundColumns count is showing as zero

Hi I am using data set and I am populating the data set using data adapter. I assigned the data source of the gridDataBoundGrid1 to the dataset. gridDataBoundGrid1.datasource=dataset1 I am not able to ge the GridBoundColumns. It is showing as zero. Please suggest in this issue.

1 Reply

AD Administrator Syncfusion Team November 5, 2003 07:11 AM

If you do not explicitly add GridBoundColumns to the grid.GridBoundColumns collection, then this property remains unpopulated. But in this case, you can use the grid.Binder.InternalColumns collection that does get populated when no GridBoundColumns have been explicitly added. Below is some sample usage. GridStyleInfo style = this.gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo; style.CellType = "ComboBox"; style.DataSource = comboColumnDataTable; style.DisplayMember = "displaymember"; style.ValueMember = "valuemember"; style.BackColor = Color.LightGoldenrodYellow;

Loader.
Live Chat Icon For mobile
Up arrow icon