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

Can nestedview open on Row select

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arnaud
Top achievements
Rank 1
Arnaud asked on 13 Dec 2010, 07:08 PM
I would like to know if there is way to get my nested view to expand when a user clicks on a row instead of clicking on the little arrow on the left?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Dec 2010, 06:16 AM
Hello Arnaud,

You can achieve this by attaching "OnRowClick" client event to RadGrid.

ASPX:
<ClientSettings>
   <ClientEvents OnRowCreated="OnRowCreated" OnRowClick="OnRowClick" />
</ClientSettings>

Java Script:
<script type="text/javascript">
    function OnRowClick(sender, args) {      
         var gridItem = args.get_item();
         gridItem.set_expanded(!gridItem.get_expanded());
    }
    function OnRowCreated(sender, args) {
    }
</script>

Note: You need to set HierarchyLoadMode as 'Client' to achieve this.

Thanks,
Princy.
Tags
Grid
Asked by
Arnaud
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or