This is a migrated thread and some comments may be shown as answers.

What is the best way to mark a selected row?

0 Answers 10 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Warren
Top achievements
Rank 1
Warren asked on 22 Jan 2014, 12:38 AM

Hello,


I have a table with three fields: RowID, CustomerName and Selected. I am loading this into the gridview and I would like to  programmatically select the row where Selected is true. If this was ASP.NET I would use the RowDatabound event and check the value of Selected and highlight. What is the best way here? After I load the list loop back through the data, get the one that is selected and then loop through the rows in the grid to select it? Seems like there would have to be a more efficient way of doing this.



Thanks,

Warren



No answers yet. Maybe you can help?

Tags
GridView
Asked by
Warren
Top achievements
Rank 1
Share this question
or