Reputation: 752
I have a RadGrid with an asp Link Button. I want to highlight the row whose link button has been clicked.
Following is the code from my grid:
<rad:GridTemplateColumn
<ItemTemplate>
<asp:LinkButton ID="lnkEditRole" runat="server" Text="View Teams" CommandArgument='<%# Bind("Roleid") %>' OnClick="Editrole_Click">
</asp:LinkButton>
</ItemTemplate>
</rad:GridTemplateColumn>
Can anyone help me with this ?
Regards,
Rmn
Upvotes: 0
Views: 1288
Reputation: 508
see the html generated by the grid, then you can make a css class .highlighted and a jQuery event like this:
$("#id_of_button").click(function(){
$("#id_of_row").addClass("highlighted");
});
Simple solution. (if you can show the generated html, I can give more specific help)
Edit:
If View Leaders
is you link button:
$("[id$=LinkViewTeam]").click(function(){
$(this).parent.parent.addClass("highlighted");
});
Upvotes: 1