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

Row Double Click to expand and collapse in a hierarchical grid

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M S
Top achievements
Rank 1
M S asked on 16 Jul 2010, 05:47 PM
How do we use the double click client side event to expand and collapse table (in a hierarchical) grid..  

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 19 Jul 2010, 08:10 AM
Hello,

You can easily achieve the functionality by attaching "OnRowDblClick" client event to RadGrid.

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


And the relevant ASPX is shown below:
  . . .
</MasterTableView>
<ClientSettings>
    <ClientEvents OnRowCreated="OnRowCreated" OnRowDblClick="OnRowDblClick" />
</ClientSettings>
  . . .


Regards,
Shinu.
Tags
Grid
Asked by
M S
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or