AD
Administrator
Syncfusion Team
November 14, 2006 05:47 AM UTC
Hi Sat,
You can use the TextBox celltype and handle the KeyPress event to cancel the non-numeric editing . Kindly refer to sample for details
private void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
if( e.KeyChar == '.')
{
if( cc.Renderer.ControlText.IndexOf(".") != -1 )
e.Handled = true;
}
else if(!char.IsDigit(e.KeyChar))
e.Handled = true;
}
Sample : http://www.syncfusion.com/Support/user/uploads/gc_7debb28c.zip
Best Regards,
Haneef