This is a migrated thread and some comments may be shown as answers.

Expand DetailTables on RowClick

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raulis
Top achievements
Rank 1
Raulis asked on 08 Jul 2016, 02:37 PM

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. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 11 Jul 2016, 01:25 PM
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.
Tags
Grid
Asked by
Raulis
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or