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

[Solved] Expanding RadGrid using JavaScript

2 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nkululeko Mthethwa
Top achievements
Rank 1
Nkululeko Mthethwa asked on 27 Nov 2009, 08:29 PM
Hello Lovers and Friends

I am using RadGrid Q2 2008
I want to expand the radgrid using JavaScript, How does one achieve that,
meaning that I Have a radgrid with a detailsTable, I want to automatically expand the table when a user moves a mouse

thank you in advance!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Nov 2009, 05:32 AM
Hello,

Try the following client side code in order to expand item on mousehover.

JavaScript:
 
<script type="text/javascript"
    function OnRowMouseOver(sender, args) { 
        var item = args.get_gridDataItem(); 
        item.set_expanded(true); 
    } 
    function OnRowCreated() { 
 
    } 
</script> 
Note: Attach 'OnRowCreated' and 'OnRowMouseOver' events to RadGrid. Also set the 'HierarchyLoadMode' to "Client".

-Shinu.
0
Nkululeko Mthethwa
Top achievements
Rank 1
answered on 30 Nov 2009, 09:00 AM

Thank you Shinu,
it worked
Tags
Grid
Asked by
Nkululeko Mthethwa
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Nkululeko Mthethwa
Top achievements
Rank 1
Share this question
or