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.
Unfortunately, activation email could not send to your email. Please try again.

deactivate current cell

Thread ID:

Created:

Updated:

Platform:

Replies:

56530 Feb 15,2007 06:42 PM Feb 16,2007 02:13 PM Windows Forms 7
loading
Tags: GridControl
Charlie Mao
Asked On February 15, 2007 06:42 PM

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

Administrator [Syncfusion]
Replied On February 16, 2007 01:24 PM

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

Charlie Mao
Replied On February 16, 2007 01:53 PM

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

Administrator [Syncfusion]
Replied On February 16, 2007 02:01 PM

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

Charlie Mao
Replied On February 16, 2007 02:09 PM

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.

Charlie Mao
Replied On February 16, 2007 02:13 PM

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.

Charlie Mao
Replied On February 16, 2007 02:13 PM

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.

Charlie Mao
Replied On February 16, 2007 02:13 PM

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.

CONFIRMATION

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.

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.

;