HA
haneefm
Syncfusion Team
August 30, 2007 12:43 AM UTC
Hi Edijs,
One you can do this by handling the MouseDown event and call CurrentCell.Validate() method to validate PushButton cell in a Grid. Here is a code snippet that shows this task.
void gridControl1_MouseDown(object sender, MouseEventArgs e)
{
GridControl _grid = sender as GridControl;
GridCurrentCell _gCurrentCell = _grid.CurrentCell;
int _irowIndex, _icolIndex;
bool _bisInsideGrid = _grid.PointToRowCol(new Point(e.X, e.Y), out _irowIndex, out _icolIndex);
if (_bisInsideGrid && ( _gCurrentCell.RowIndex != _irowIndex || _gCurrentCell.ColIndex != _icolIndex ) )
{
if (_grid.Model[_irowIndex, _icolIndex].CellType == "PushButton")
{
_gCurrentCell.Validate();
}
}
}
Best regards,
Haneef