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 issue

Thread ID:

Created:

Updated:

Platform:

Replies:

31069 Jun 29,2005 01:38 PM Jun 30,2005 12:12 PM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 29, 2005 01:38 PM

I have a dual virtual grid scenario in which there is a heirarchical relationship between the top grid and the bottom grid. The simple action I want to accomplish is to select the (1,1) cell position (assumming row and column header counts of 1) on form load programmatically so that any and all subsequent events get fired and the grid shows the Black focus rectangle on that cell. I perform a CurrentCell.MoveTo(1,1, GridSetCurrentCellOptions.SetFocus), and indeed i get my events to fire and the bottom grid is populated with the child records belonging to the "selected" parent record in the top grid. HOWEVER, there is no focus indicator on the cell i just moved to. I have tried using all manners of combinations of GridSetCurrentCellOptions, grid focusing, grid.ForceCurrentCellMoveTo, etc... Two interesting observations: 1) If I do a MoveTo(1,0) - I do get the dotted focus rectangle in the column header with the row highlighted 2) If I do a CurrentCell.MoveDown(1,false) and then a CurrentCell.MoveRight(1,false), I indeed get the black focus rectangle in the cell I want (but of couse I see all the movement of the cells). Any help you can provide is appreciated. I am using version 2.1.0.9 of the grid.

Administrator [Syncfusion]
Replied On June 29, 2005 02:03 PM

Try these calls in Form.Load; this.ActiveControl = grid; this.gridControl1.ForceCurrentCellMoveTo = true; this.gridControl1.MoveTo(1,1); this.gridControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.AlwaysVisible; The last line should always show a currentcell. You may not want this.

Administrator [Syncfusion]
Replied On June 29, 2005 03:49 PM

Clay, Thanks for your quick response - it''s very much appreciated. However, your solution did not work. Some things to note: 1) I did not find a MoveTo method directly on the grid as your sample suggested so I continued to use the CurrentCell.MoveTo method 2) For what it''s worth, I don''t do the moving cell code in form load. We use asynchronous data calls so its put elsewhere, but I dont'' think that should matter. 3)I''d love to send a sample, or even create a new application that duplicates what I''m doing, but the environment I work in is so complicated that it could take days to send you a meaningful sample. 4) Even after setting ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.AlwaysVisible, I see no cell border anywhere. As I previously stated, If I MoveTo(1,0), i do get the dotted rectangle on the header row with you code in place. Any other suggestions?

Administrator [Syncfusion]
Replied On June 29, 2005 03:54 PM

You cannot reproduce the problem in a simple sample? If your movedown, moveleft that you described above works for your, then you can call grid.BeginUpdate(); //movedown moveleft... grid.EndUpdate(); grid.Refresh();

Administrator [Syncfusion]
Replied On June 30, 2005 12:12 PM

Clay, Thanks again for your quick reply and suggestions. Just thought I''d follow up. As it turns out, for some reason I had it stuck in my mind that CurrentCell.MoveTo was a purely visual concept - one that would only affect Visbile columns. I had one hidden column after the Column header and performing a MoveTo(1,1) was moving the CurrentCell to that hidden column, but obviously, since it was hidden, I was not getting a black rectangle.

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.

;