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

Problem with Grid(Heirachial)

1 Answer 33 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mathews
Top achievements
Rank 1
Mathews asked on 15 Sep 2008, 01:02 PM
Hello please have a look on the same and give a reply on that

am having a heirarchial grid(2 level). am using Object data source for binding data.when we click on the expand button .i need the client side event so that i can get the data key values at client side itself. please tell me the event name for getting that

regards
Mathews Baby

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Sep 2008, 06:19 AM
Hi Mathews,

You can use the OnHierarchyExpanding client event for achieving the desired scenario. Also set HierarchyLoadMode to client in the aspx.

ASPX:
 <MasterTableView DataSourceID="SqlDataSource1"  ClientDataKeyNames="FirstName" HierarchyLoadMode="Client"      > 
              

 <ClientSettings  > 
      <ClientEvents    OnHierarchyExpanding="HierarchyExpanding" /> 
   </ClientSettings> 

JS:
 <script type="text/javascript" language="javascript" > 
          
        function HierarchyExpanding(sender, eventArgs) 
        { 
        var key=eventArgs.getDataKeyValue("FirstName"); 
        alert(key); 
         
        } 
  </script > 


Hope this helps..
Shinu.
Tags
General Discussions
Asked by
Mathews
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or