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. Image for the cookie policy date
close icon

deactivate current cell

Hi,

I am having a problem editing in a current cell and reflecting that change in the database. Currently when i click on a cell and make a change in that particular cell the value isnt reflected. I have to click on a cell, make a change in that particular cell, and then move the focus off that cell for the change to be reflected. Is there a way to disable the current cell or is that not my problem. Any help is appreciated.

Thanks,
Charlie

7 Replies

AD Administrator Syncfusion Team February 16, 2007 06:24 PM UTC

Hi Charlie,

To push all data to underlying datasource for every cell movement, you need to call in Binder.EndEdit Method(before calling this , you need to call the CurrentCell''s Edit method). Here is a code snippet.

//CurrentCellMoving event.
this.grid.CurrentCell.EndEdit(); //saves the currentcell
this.grid.Binder.EndEdit(); //removes the pencil

Let me know if this helps.
Regards,
Haneef


CM Charlie Mao February 16, 2007 06:53 PM UTC

I'm not sure if that is what I'm looking for. I tried the code snippet and it didnt work. Is there a way to change the current cell focus on a different cell. because for some reason when I make a change in a current cell, i have to take focus off that cell for it to work. any ideas. thanks again for the suggestion.

Charlie


AD Administrator Syncfusion Team February 16, 2007 07:01 PM UTC

Hi Charlie,

Use CurrentCell.MoveTo method to move the current cell to specified area and gives instruction about activation of current cell.

CurrentCell.MoveTo( RowIndex,ColIndex,GridSetCurrentCellOptions.SetFocus);

Let me know if this helps.

Best regards,
Haneef


CM Charlie Mao February 16, 2007 07:09 PM UTC

Hey Haneef,

It says
that 'Syncfusion.Windows.Forms.Grid.GridDataBoundGrid' does not contain a definition for 'MoveTo'

I am using a data bound grid. Is this method only for grid controls.


CM Charlie Mao February 16, 2007 07:13 PM UTC

ok sorry, I found the method. It does change focus, but when it moves to a diffent cell, it changes the cell that I jsut made a change to back to the original. Any ideas.


CM Charlie Mao February 16, 2007 07:13 PM UTC

ok sorry, I found the method. It does change focus, but when it moves to a diffent cell, it changes the cell that I jsut made a change to back to the original. Any ideas.


CM Charlie Mao February 16, 2007 07:13 PM UTC

ok sorry, I found the method. It does change focus, but when it moves to a diffent cell, it changes the cell that I jsut made a change to back to the original. Any ideas.

Loader.
Live Chat Icon For mobile
Up arrow icon