I can''t seem to figure out how to change the button text in the "CellButtonClicked" event of my GridControl.
I have the CellType defined as "PushButton" and in the CellButtonClicked event I try changing the text of the button but the change does not appear on the grid.
For example, e.Button.Text = "abc" or _grid(e.RowIndex, e.ColIndex).Text = "abc" both do not work. I''ve also tried calling RefreshRange on the cell itself with no luck.
This should be simple to do - I have access to the Button through the GridCellButtonClickedEventArgs class but I am not having any luck.
Thanks for any direction,
ADAdministrator Syncfusion Team December 29, 2004 02:00 AM
The text displayed on the PushButton in a grid cell is controlled through the GridStyleInfo.Description property for the cell. So, try setting
Me.gridControl1(e.RowIndex, e.ColIndex).Description = "abc"