We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Editing a Cell

Thread ID:





60261 May 1,2007 06:19 PM UTC May 1,2007 10:08 PM UTC WinForms 1
Tags: GridControl
Asked On May 1, 2007 06:19 PM UTC

When I click on a cell that is a Numeric Up Down it takes two clicks to change the value. I checked this by seeing if it is editing, using this.gridname.CurrentCell.IsEditing. Which doesn't switch to true until the second click. How do I get this to change so that when the cell is clicked once it changes the value.

Thanks again

haneefm [Syncfusion]
Replied On May 1, 2007 10:08 PM UTC

Hi John,

You can try this code snippet in CellButtonClicked event of the grid and let me know if this helps.

private void gridControl1_CellButtonClicked(object sender, GridCellButtonClickedEventArgs e)
GridControl grid = sender as GridControl;
if( !grid.CurrentCell.IsEditing )
object cellText = grid.Model[e.RowIndex,e.ColIndex].CellValue ;
if( cellText != null && cellText.ToString() != string.Empty )
int i = int.Parse( cellText.ToString() );
if( e.ButtonIndex == 0 )///Up button
grid.Model[e.RowIndex,e.ColIndex].CellValue = i+1;
else//Down button
grid.Model[e.RowIndex,e.ColIndex].CellValue = i-1;
e.Cancel = true;

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon