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 populate the grid with rows and am handling the Click event of the grid and checking the gridObject.CurrentCell to be able to tell which row has been clicked.
Later I repopulate the grid with different rows, but the currentCell property of the grid stays referencing cells I''ve removed from the grid by resetting the rowCount to be the header count. The click event from clicking the grid''s header row is also not resetting the gridObject.CurrentCell, because allow rowheader selection is disabled, so now my code is looking for a currentCell that is no longer there.
I have looked for a way to reset the current cell manually but can''t find it. Any suggestions?
ADAdministrator Syncfusion Team November 8, 2005 04:31 PM UTC
You can use the grid.CurrentCell.MovetTo method to set the grid''s current cell.
One other comment is the the grid has e grid.CellClick event that you might consider using. It has e.RowIndex and e.ColIndex of the clicked cell set in its event arguments.