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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridBoundColumns in DataBound Grid

Thread ID:





39499 Jan 10,2006 11:17 AM UTC Jan 10,2006 03:09 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On January 10, 2006 11:17 AM UTC

Hello, i''m using GridDataBound i link a the grid with the dataTable as a datasource, then i create two GridBoundColumn which will be unbounds columns (one column contain buttons and the other comboBoxs) when I add them the grid by using GridBoundColumns.AddRange,the dataTable columns does not appear in the grid, when i comment the "GridBoundColumns.AddRange", i could display the the dataTable in the grid Thanks in advance

Administrator [Syncfusion]
Replied On January 10, 2006 03:09 PM UTC

Hi, You can add unbound columns with the help of GridBoundColumnCollection. You can add the unbound columns one by one to the gridBoundColumnCollection or collectively using gridBoundColumnCollection.AddRange. Here is code snippet. GridBoundColumnsCollection column = (GridBoundColumnsCollection) this.gridDataBoundGrid.Binder.InternalColumns.Clone(); GridBoundColumn Ucolumn1 = new GridBoundColumn(); GridStyleInfo style1 = Ucolumn1.StyleInfo; style1.CellType ="PushButton"; //column.Add(Ucolumn1); //Add one by one GridBoundColumn Ucolumn2 = new GridBoundColumn(); GridStyleInfo style2 = Ucolumn1.StyleInfo; style2.CellType ="ComboBox"; //column.Add(Ucolumn2); //Add one by one column.AddRange(new GridBoundColumn[] {Ucolumn1,Ucolumn2}); //Add by AddRange Regards, Calvin.


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