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.
User can select a row from the grid and edit the details and save it to the database. Once the save is done i need to programatically select/highlight the first row .
Following code does it
grid.BeginUpdate()
grid.DataSource =null;
grid.DataSource= ds;
grid.Table.FilteredRecords[0].SetCurrent();
grid.EndUpdate(true);
grid.Refresh();
Even though the first record gets selected with the above code, the previous selected row by the User is also highlighted.
Please help me on this.
ADAdministrator Syncfusion Team July 19, 2006 05:16 AM UTC
Hi Gopi,
By calling Table.SelectedRecords.Clear() method after setting the datasource for the grid, resolves this problem.
Change the code as below.
grid.BeginUpdate()
grid.DataSource =null;
grid.DataSource= ds;
grid.Table.SelectedRecords.Clear();
grid.Table.FilteredRecords[0].SetCurrent();
grid.EndUpdate(true);
You can also select the records programatically using the code below.
grid.Table.SelectedRecords.Add( grid.Table.Records[0] );
Let us know if you have any other questions.
Thanks for using Syncfusion Products.
Regards,
Rajagopal