GridDataBoundGrid style and custom cells

Sorry, it was previously posted in the ASP.NET forum, but I meant to post it here.. :( Hi, We''''re trying to use a Syncfusions grid here where the data is bound from a DataTable retrieved from the database. To do this I used a GridDataBoundGrid (GDBG) which worked instanly. I added 2 custom columns that weren''''t from the database, these columns are meant to be use for data manipulation. These two new columns have a specific use for every row: The first column, a checkbox, used to select rows I want to delete in a batch. The second column is a button used to launch a dialog to edit the current row. I''''ve tried to do something like this: grid(x,y).Description = "Edit" grid(x,y).CellAppearance = Raised grid(x,y).CellType = "Pushbutton" But it just won''''t work. I''''ve seen it work with the GridControl control, but I can''''t get it to work with DGBD. Maybe I should use another grid control? Thanks

1 Reply

AD Administrator Syncfusion Team September 12, 2005 06:47 AM UTC

Hi Fred, Refer this KB How do I insert an unbound check box column in a GridDataBoundGrid? To add a push button column, use the QueryCellInfo handler as used in the sample. int PushbuttonColIndex = this.gridDataBoundGrid1.Model.NameToColIndex("Pushbutton"); if(e.RowIndex > 0 && e.ColIndex == PushbuttonColIndex) { e.Style.CellType = "PushButton"; e.Style.Description = "Edit"; e.Style.CellAppearance = GridCellAppearance.Raised; } Best regards, Stanley

Loader.
Up arrow icon