On grid, how to highlight previous selected row?

I have variable SelectedPicMst to keep this selection, but I don't have idea how to highlight it again when I check 2nd tab and come back to 1st tab, to use code directly.

I got similar answer on How to highlight selected row in Grid?

Can I have sample code to complete it?

        protected async System.Threading.Tasks.Task Grid0RowSelect(RadzenDh5.Models.Mark10Sqlexpress04.PicMst args)
            SelectedPicMst = args;

If you do not use Radzen you can simply set @bind-Value=SelectedPicMst. In Radzen the sample code can be found in the thread you’ve posted. The same of course (RowSelect/Value) can be used without Radzen (in Visual Studio) as well.

Thanks to show me


I believe that's a good way to go.

Got Error.
Should I do any casting for this case?

        public RadzenDh5.Models.Mark10Sqlexpress04.PicMst SelectedPicMst { get; set; }
        public RadzenDh5.Models.Mark10Sqlexpress04.PicDtl SelectedPicDtl { get; set; }
        public RadzenDh5.Models.Mark10Sqlexpress04.PicSno SelectedPicSno { get; set; }

DataGrid Value property is of type object and SelectedPicMst should be object as well. This is needed since Value can be single item or IEnumerable when selecting multiple items. We plan to provide soon new reworked DataGrid component (RadzenDataGrid) where Value will be always IList - everything else will be very similar to identical to the current RadzenGrid component.

Based on your advice.
Now it's working.
Thanks a lot!


public object objSelectedPicMst { get; set; }