Hi
I like the nested view model. However I am not a big fan of the small expand/contract button since I think it basically too small and might be a bit hard for the user to understand that it will expand the details for that record.
Is there a way I can allow the user to expand the row by clicking anywhere on it (possible with client-side selection).
Cheers,
Soeren
I like the nested view model. However I am not a big fan of the small expand/contract button since I think it basically too small and might be a bit hard for the user to understand that it will expand the details for that record.
Is there a way I can allow the user to expand the row by clicking anywhere on it (possible with client-side selection).
Cheers,
Soeren
4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 09 Nov 2010, 05:22 AM
Hello Soeren,
You can refer the following Code Library which explains how to Expand/Collapse a grid item when double clicking on the row. Use the same approach and instead of the OnRowDblClick client event, add OnRowClick client event.
Expand/collapse hierarchy client-side on double click
Thanks,
Princy.
You can refer the following Code Library which explains how to Expand/Collapse a grid item when double clicking on the row. Use the same approach and instead of the OnRowDblClick client event, add OnRowClick client event.
Expand/collapse hierarchy client-side on double click
Thanks,
Princy.
0

Soeren Pedersen
Top achievements
Rank 1
answered on 14 Nov 2010, 08:40 PM
Thanks Princy
Sorry for the delay in getting back to you.
I had hoped to be able to do this without changing the loadmode to client as the the size of the details for each record is quite high.
Are there really no way of triggering the expand/collapse without reverting to client mode?
Regards,
Soeren
Sorry for the delay in getting back to you.
I had hoped to be able to do this without changing the loadmode to client as the the size of the details for each record is quite high.
Are there really no way of triggering the expand/collapse without reverting to client mode?
Regards,
Soeren
0
Hello Soeren,
The desired functionality can be achieved with HierarchyLoadMode="ServerOnDemand" or "ServerBind" as well. In these cases you can handle the RowClick event in the following way:
Additionally, in order to optimize the performance of the grid I recommend that you wrap the controls in the nestedview template in a panel and switch its visibility on expand/collapse. You can see how this is implemented in the Hierarchy with Templates demo.
I hope this helps.
Best wishes,
Mira
the Telerik team
The desired functionality can be achieved with HierarchyLoadMode="ServerOnDemand" or "ServerBind" as well. In these cases you can handle the RowClick event in the following way:
function
RowClick(sender, args) {
if
(sender.get_masterTableView() == args.get_tableView()) {
var
masterTable = sender.get_masterTableView();
masterTable.fireCommand(
"ExpandCollapse"
, args.get_itemIndexHierarchical());
}
}
Additionally, in order to optimize the performance of the grid I recommend that you wrap the controls in the nestedview template in a panel and switch its visibility on expand/collapse. You can see how this is implemented in the Hierarchy with Templates demo.
I hope this helps.
Best wishes,
Mira
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Soeren
Top achievements
Rank 1
answered on 17 Nov 2010, 12:20 PM
Ahh perfect.
Thanks very much for your help.
Regards,
Soeren
Thanks very much for your help.
Regards,
Soeren