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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Cell Focus Change

Thread ID:

Created:

Updated:

Platform:

Replies:

11931 Mar 18,2004 12:06 PM UTC Mar 18,2004 05:26 PM UTC WinForms 5
loading
Tags: GridControl
Rob Panosh
Asked On March 18, 2004 12:06 PM UTC

Hello, In my DataBoundGrid I am trapping the "ModelSaveCellInfo" event to manually save the data from the cell back to the collection associated to my Grid and all is working well. Ok now if I click on a cell and make a change then click on a Button (or any other control) on my form the control in the cell looses focus. What I would like to do is when the control in the grid cell looses focus push the changes from the control back to the associated datasource (collection). I have tried this by trapping "CurrentCellControlLostFocus" but it doesn''t pass the row/column as does the "Mode3lSaveCellInfo" event. Any help would be appreciated. Thanks, Rob Panosh

Administrator [Syncfusion]
Replied On March 18, 2004 12:35 PM UTC

Hi Rob, try setting CausesValidation = true for the button. This will then trigger a Validate call on the grid which then triggers a SaveCellInfo. Stefan >Hello, > >In my DataBoundGrid I am trapping the "ModelSaveCellInfo" event to manually save the data from the cell back to the collection associated to my Grid and all is working well. Ok now if I click on a cell and make a change then click on a Button (or any other control) on my form the control in the cell looses focus. What I would like to do is when the control in the grid cell looses focus push the changes from the control back to the associated datasource (collection). I have tried this by trapping "CurrentCellControlLostFocus" but it doesn''t pass the row/column as does the "Mode3lSaveCellInfo" event. > >Any help would be appreciated. > >Thanks, >Rob Panosh

Administrator [Syncfusion]
Replied On March 18, 2004 12:48 PM UTC

Stephan, It is a little more complicated then that... My grid is on a tab page and when the user clicks outside the tab page I would like to trigger the SaveCellInfo event. Is there a way to trigger this evnet in the "CurrentCellControlLostFocus" event? Thanks, Rob >Hi Rob, > >try setting CausesValidation = true for the button. This will then trigger a Validate call on the grid which then triggers a SaveCellInfo. > >Stefan > >>Hello, >> >>In my DataBoundGrid I am trapping the "ModelSaveCellInfo" event to manually save the data from the cell back to the collection associated to my Grid and all is working well. Ok now if I click on a cell and make a change then click on a Button (or any other control) on my form the control in the cell looses focus. What I would like to do is when the control in the grid cell looses focus push the changes from the control back to the associated datasource (collection). I have tried this by trapping "CurrentCellControlLostFocus" but it doesn''t pass the row/column as does the "Mode3lSaveCellInfo" event. >> >>Any help would be appreciated. >> >>Thanks, >>Rob Panosh

Administrator [Syncfusion]
Replied On March 18, 2004 03:58 PM UTC

Try calling grid.CurrentCell.ConfirmChanges from CurrentCellControlLostFocus to see if that does what you need.

Rob Panosh
Replied On March 18, 2004 04:28 PM UTC

Clay, Thanks that worked. This also works grid.Model.EndEdit(). Should I use one over the other? Thanks, Rob >Try calling grid.CurrentCell.ConfirmChanges from CurrentCellControlLostFocus to see if that does what you need.

Administrator [Syncfusion]
Replied On March 18, 2004 05:26 PM UTC

Model.EndEdit checks to see if the grid has a CurrentCell, and if it does, it calls CurrentCell.EndEdit. So, I do not think it matters which you use since you know you have a current cell when the cell control loses focus (I think).

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.

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

;