Blazor Grid: first row selection

0 Answers 48 Views
Grid
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Deasun asked on 27 Nov 2023, 04:24 PM

How to set in code the first row of the grid selected?

grdRptCallDetails_SelectedItems = RptResults[0].ToList();

Wont work. So How do I set that to the first row in the grid?

 

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 27 Nov 2023, 06:14 PM

ok, just incase anyone else needs this:

lgRecID = gdCallDetails[0].RecordNbr;
grdRptCallDetails_SelectedItems = gdCallDetails.Where(item => item.RecordNbr == lgRecID).ToList();

Only issue with this is you have to have a unique ID value in that RecordNbr field. for each row.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Share this question
or