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.

CurrentCell.MoveTo not working

Thread ID:

Created:

Updated:

Platform:

Replies:

4710 May 27,2003 12:52 PM May 27,2003 03:51 PM Windows Forms 1
loading
Tags: GridControl
Cathy Noakes
Asked On May 27, 2003 12:52 PM

I am using a GridControl which I load from memory. When I first create and manage the grid I try to set the default selection to a row in the grid and move the current cell to that row. I am doing something like: gridControl1.Selections.Clear(); gridControl1.CurrentCell.MoveTo(irow, 0); gridControl1.Selections.Add(Syncfusion.Windows.Forms.Grid.GridRangeInfo.Row(irow)); gridControl1.ScrollCellInView(irow, 0); (this is something of an oversimplification, but that's the gist). Anyway, the MoveTo does not seem to be doing anything and the next time I go to use the CurrentCell.RowIndex or CurrentCell.ColumnIndex they still have values of -1. The return result of the MoveTo call is false; the ErrorMessage property of the CurrentCell is empty. I tried adding a try/catch block and I tried adding a MoveFailed event handler but neither caught anything. I suspect that I am simply doing something wrong but I am having trouble figuring out what. Could you perhaps give me some hints on when MoveTo will not work? Are there settings for the grid control with which it is not compatible? Will it only work after a certain point in the initialization of the grid (similar to controls that need things done on load instead of in the constructor)? Any ideas you can throw my way would be greatly appreciated. Thanks, Cathy

Administrator [Syncfusion]
Replied On May 27, 2003 03:51 PM

Set ForceCurrentCellMoveTo = true when positioning the current cell before the grid is initially displayed. Otherwise the grid tries to delay setting the current cell until it is shown. Stefan

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.

;