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.

Changing the current cell during a Move

Thread ID:

Created:

Updated:

Platform:

Replies:

13010 Apr 18,2004 04:45 PM Apr 19,2004 02:10 AM Windows Forms 3
loading
Tags: GridControl
Sue Harris
Asked On April 18, 2004 04:45 PM

I have a virtual grid which changes the number of rows it has during a SaveCellInfo event, and has the last row disabled but for the first column. I''m trying to deal with a situation where during my SaveCellInfo event the row changes so that the current row is now the last row, and the cell which is being moved to (by a tab key press from the first column which triggered the SaveCellInfo) will be disabled. I want to set the current cell back to the first column (which is enabled), and I can detect when I''m in this situation, but since I''m in a MoveTo I can''t seem to change the current cell (it appears to get set back to the original destination after the event). Do you have any suggestions how I can change what the new Current Cell location would be? Thanks, Sue

Administrator [Syncfusion]
Replied On April 18, 2004 05:10 PM

Instead of trying to add the row and change the current cell in SaveCellInfo, can you do it in QueryNextCurrentCell? This is the event that is fired to let you dynamically change where the current cell is going. SaveCellInfo was not intended to be used for this functionality.

Sue Harris
Replied On April 18, 2004 10:26 PM

I could possibly use the QueryNextCurrentCell event. However, what sort of assumptions can I make. Will the current cells value (if changed) be what will be used in the SaveCellInfo, or is there any possibility that the QueryNextCurrentCell can be called during editing (before it is finished)? If I set the next cell back to the current cell, will the SaveCellInfo event still get called? Thanks, Sue

Administrator [Syncfusion]
Replied On April 19, 2004 02:10 AM

QueryNextCurrentCell will only be called when your user indicates he wants to leave the cell by clicking off the currentcell or tabbing or arrowing out of the currentcell. I am not sure whether SaveCellInfo would be called if you set the currentcell back to itself. I suspect it would be. If it is not, then you can always force the a SaveCellInfo hit (provided the value has changes) by calling grid.CurrentCell.ConfirmChanges.

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.

;