What is the best way to mark a selected row?

1 posts, 0 answers
  1. Warren
    Warren avatar
    61 posts
    Member since:
    Aug 2013

    Posted 21 Jan 2014 Link to this post

    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



Back to Top