I’m having a GridView which contains a Column ID
I’m having a DataTable which contains two columns
ID
DONE
I’m Binding the ID Column in the DataTable to the GridView.
Until no Its fine.
But now I need to set the Background color of the GridView Row Basing on the DONE Column Value in DataTable.( If DONE value is true the Row Background Color has to be changed.)
How can I achieve this without binding the DONE Row to the GridView??
Create
GridView1_RowDataBoundevent for your GridView.example code snippet:
Refer following link for more detailed implementation:
Change GridView row color based on condition
Note: If that row does not exist in DataSource then you must have some logic to get that from other place. May be you have
IDas Foreign Key in another table.