Adding Pushbutton to GridControl Cell

Using v.3.0.1.1 GridControl, I am trying to add a clickable button to a cell. I am generating the rows and cells dynamically at run time. The button is not appearing at all. What do I need to do? I set the column type to "PushButton" then at run time I create a GridInfo and set the cell. GridStyleInfo info = new GridStyleInfo(); info.CellType = "PushButton"; info.Text = "Click"; info.CellValueType = typeof(string); I then add the cell to the grid control with the index of the row and column: GridControl.SetCellInfo(gridPoint.RowIndex, col, info, StyleModifyType.Override); thanks Lawrence

1 Reply

AD Administrator Syncfusion Team November 15, 2005 05:11 AM UTC

Hi Lawrence, Please try this code GridStyleInfo info = new GridStyleInfo(); info.CellType = "PushButton"; info.Description = "Click"; info.CellValueType = typeof(string); gridControl1.SetCellInfo(5,3, info, Syncfusion.Styles.StyleModifyType.Override); this.gridControl1.Refresh(); Here is a sample for implementing it pushButton1.zip Let me know if you need any further assistance. Regards, Haneef

Loader.
Up arrow icon