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.
Syncfusion Feedback

Calling CurrentCell.MoveTo when grid not focused

Thread ID:

Created:

Updated:

Platform:

Replies:

5240 Jun 25,2003 04:04 PM UTC Jun 25,2003 08:18 PM UTC Windows Forms 3
loading
Tags: GridControl
Sean Greer
Asked On June 25, 2003 04:04 PM UTC

I have a GDBG that I filter using a TextBox. As the user types in the TextBox, I filter the DataView. The GDBG is using the fullrow highlighting trick of hooking CellActivated, CellMoving, CellDeactived, etc. I want to ensure that the first row in the grid is selected once the user filters the grid, so I attempt a call to grid.CurrentCell.MoveTo(1, 1) but it will not highlight the row unless the grid is focused. Is my approach flawed or is there another approach that would be better? Sean

Administrator [Syncfusion]
Replied On June 25, 2003 06:19 PM UTC

Sean, I tried to reproduce the problem in the attached sample and could not. Is your grid or textbox in some other containers than a Form like this sample?

Sean Greer
Replied On June 25, 2003 07:10 PM UTC

Clay, If you change the tab order so that the TextBox receives focus on load, you'll see the problem that I describe. Thanks, Sean

Administrator [Syncfusion]
Replied On June 25, 2003 08:18 PM UTC

I added this.gridDataBoundGrid1.ForceCurrentCellMoveTo = true; to the bottom of Form_Load, and then the CurrentCell.MoveTo in TextBox_Changed worked as expected. Also, if you want to initially see the selected row in the grid, you can also add a this.gridDataBoundGrid1.CurrentCell.MoveTo(1,1); in FormLoad as well.

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

;