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.
When my app opens, I''d like to set focus to the first editable cell in the grid. I presume that CurrentCell.MoveTo is the appropriate method, but I don''t know how to identify the row/column of the first enabled cell.
Ideas?
Thanks,
s.s.
ADAdministrator Syncfusion Team July 28, 2004 10:37 PM UTC
Do you want to look through the row or down the column? You have some choices to consider.
You can always loop though cells checking grid[row,col].Enabled until your find one, and then use grid.CurrentCell.MoveTo to position that currentcell.
If you want to look across the first row, and you know the first row has at least one enabled cell, you can use code like this to find it without looping.
this.gridControl1.CurrentCell.MoveTo(1,0);
this.gridControl1.CurrentCell.MoveRight();
You can do the something similar looking down column 1.
But if you do not have information to know there is at least one enabled cell in a row or column, then I think you would have to loop through the rows and columns in the order you decide, looking for an enabled cell.
ADAdministrator Syncfusion Team July 29, 2004 01:48 AM UTC
Thanks, Clay.
Indeed, the row and column of the first enabled cell varies frequently.
I was hoping there might be a better way than that (some usage or variation of QueryNextEnabledCell) that would do the trick.
Since I set the enabled attribute during the grid''s load logic, I just decided to save the location of the first enabled cell.
Thanks again.
s.s.