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?
ADAdministrator Syncfusion Team June 25, 2003 02:19 PM
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?
SGSean GreerJune 25, 2003 03:10 PM
If you change the tab order so that the TextBox receives focus on load, you'll see the problem that I describe.
ADAdministrator Syncfusion Team June 25, 2003 04:18 PM
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
in FormLoad as well.