Expand DetailTables on RowClick

2 posts, 1 answers
  1. Raulis
    Raulis avatar
    14 posts
    Member since:
    Jun 2016

    Posted 08 Jul Link to this post

    I've got a Grid which holds quite a few columns of information.The first column of each row is a button with a unique ID that, when clicked, expands the DetailTables with relevant information to the row. The button executes the following command: CommandName="expandCollapse" .

     

    How can I make it so that whenever I click a row it would expand the DetailTables? Any help would be much appreciated. 

  2. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 11 Jul Link to this post

    Hi,

    You can use the client-side OnRowClick event and manually expand the item. For that you can use the fireCommand() method.



    function rowClick(sender, args) {
        var grid = sender;
        var masterTable = grid.get_masterTableView();
        var itemIndex = parseInt(args.get_itemIndexHierarchical());
     
        masterTable.fireCommand("ExpandCollapse", itemIndex);
         
    }


    Regards,
    Viktor Tachev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top