Detail Item Template row click event

2 posts, 0 answers
  1. Mir
    Mir avatar
    5 posts
    Member since:
    Aug 2014

    Posted 25 Jun 2015 Link to this post

    I am using Detail Item Template for displaying some extra information on radgrid. I want to highlight the Detail Item Template row as well as its parent row while clicking on the Detail Item Template row. Is there any way to handle Detail Item Template row's click event? Any help will be highly appreciated.
    Thanks in advance. 
  2. Eyup
    Eyup avatar
    3953 posts

    Posted 30 Jun 2015 Link to this post

    Hi Mir,

    You can wrap the entire content in a Container element to implement the following logic:
        <asp:Panel ID="Panel1" runat="server" onclick='<%# "detailItemClick("+(Container.RowIndex/3-1)+");"%>'
    function detailItemClick(index) {
        var dataItems = $find('<%= RadGrid1.ClientID %>').get_masterTableView().get_dataItems();
        var row = dataItems[index].get_element(); = "lime";
        $(row).next()[0].style.backgroundColor = "lime";

    Hope this helps. I am also attaching a sample RadGrid web site to demonstrate Hover effect over the DetailItemTemplate.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top