The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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?
SGSean GreerJune 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
ADAdministrator Syncfusion Team 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.