I have created griddatabound to bind the dataset. there are columns created in PrepareViewStyleInfo event. tt column added is of celltype checkbox.
so when i trigger the checkbox event, i will need to add pushbutton. however this pushbutton just can''t display out. is it i can''t add pushbutton during runtime? or in a event?
ADAdministrator Syncfusion Team August 6, 2004 01:33 AM
You cannot set a style property (other than CellValue (or Text which is essentially the same property as CellValue)) on an individaul cell in a GridDataBoundGrid.
When you say you are setting a pushbutton in your checkbox click event, is this what you mean? If so, you cannot just set gridDataBoundGrid[row, col].CellType = "PushButton". Instead, what you can do is to handle the grid.Model.QueryCellInfo event. There if e.RowIndex > 0 and e.ColinDex points to the column where you want to maybe set the pushbutton, you should check the value of grid[e.RowIndex, checkBoxColumnIndex].CellValue to see if it is true. If so, then set e.Style.CellType = "PushButton".
Here is a little sample that changes a cell to a pushbutton when a checkbox in another cell is checked. It uses QueryCellInfo as described above, and also uses CurrentCellChanged to make sure the pushbutton cell gets redrawn when teh checkbox changes.
ZHzhAugust 10, 2004 07:47 PM
thank you so much. however, it is possible to show me in .vb version? i coding in vb.net. and somehow i could not find the querycellinfo event... sorry to trouble you...
ADAdministrator Syncfusion Team August 11, 2004 01:34 AM