c# - how can set a color to a row of gridview when link button is clicked -
i have gridview in page. grid has 1 linkbutton. how can set color row of gridview when linkbutton clicked?
<asp:templatefield itemstyle-width="20%" headertext="options" headerstyle-cssclass="headerfont"> <itemtemplate> <div class="headerfontnew"> <asp:checkbox id="checkview" runat="server" checked='<%# bool.parse(eval("rm_rights").tostring() == "1" ? "true": "false") %>' enabled="true" onclick="checkboxcheck(this);"/> <asp:checkbox id="checkinsert" runat="server" checked='<%# bool.parse(eval("rm_rights").tostring() == "2" ? "true": "false") %>' enabled="true" onclick="checkboxcheck(this);" /> <asp:checkbox id="checkupdate" runat="server" checked='<%# bool.parse(eval("rm_rights").tostring() == "3" ? "true": "false") %>' enabled="true" onclick="checkboxcheck(this);"/> <asp:checkbox id="checkdelete" runat="server" checked='<%# bool.parse(eval("rm_rights").tostring() == "4" ? "true": "false") %>' enabled="true" onclick="checkboxcheck(this);"/> <asp:linkbutton id="linkbutton1" commandname="child" commandargument='<%#eval("menu_id")%>' runat="server" > <img id="childmenu" src="images/image_viewer.png" class="gridimage" title="view childs" runat="server" ></img></asp:linkbutton> </div> </itemtemplate> <headerstyle cssclass="headerfont"></headerstyle> <itemstyle></itemstyle> </asp:templatefield>
if link inside td, row (parent) , change color, this
$('#linkbutton').parent().css('background-color', '#f00');
Comments
Post a Comment