I have a gridview with checkboxes. Am binding data to gridview in pageload. Upon selection of checkbox i am changing gridview row color by finding gridview row id (code written in javascript).
document.getElementById(gv_ctrl02).style.backgroundColor = "beige";
and gridview data rendering as below row ids.
table
tr id="gv_ctrl02" td 1000 /td td Anil /td /tr
tr id="gv_ctrl02" td 1002 /td td Suri /td /tr
tr id="gv_ctrl02" td 1003 /td td Jagan /td /tr
table
I have a button on my page and on click of it some action is happening. after that i check gridview rendred code it is not having row ids and below is my gridview rendered code
table
tr td 1000 /td td Anil /td /tr
tr td 1001 /td td Suri /td /tr
tr td 1003 /td td Jagan /td /tr
table
As the rowids not generated, code for changing row color is not working.
document.getElementById(gv_ctrl02).style.backgroundColor = "beige";
//throwing Null javascript exception due to row id gv_ctrl02 is not available.