c# - How to get expended row columns values onHierarchyExpanded in radgrid -


i have radgrid follow :

 <telerik:radgrid id="productranges_grd" showheaderwhenempty="true" runat="server"                         autogeneratecolumns="false" width="100%" height="250px" showheader="true" visible="false"                          ondetailtabledatabind="productranges_grd_detailtabledatabind" onitemcommand="productranges_grd_itemcommand"                           oninsertcommand="productranges_grd_insertcommand" onupdatecommand="productranges_grd_updatecommand"                            onneeddatasource="productranges_grd_needdatasource" ondeletecommand="productranges_grd_deletecommand"                           onitemdatabound="productranges_grd_itemdatabound"  >                         <clientsettings>                         <clientevents onrowselected="rowselected"  onhierarchyexpanded="hierarchyexpanded" />                             <scrolling allowscroll="true" />                             <selecting allowrowselect="true"  />                         </clientsettings>                         <mastertableview editmode="editforms" hierarchyloadmode="client" datakeynames="provider_id,provider_name"                              hierarchydefaultexpanded="false">                             <norecordstemplate>                                 <span></span>                             </norecordstemplate>                             <columns>                                 <telerik:gridboundcolumn uniquename="provider_id" datafield="provider_id" display="false">                                 </telerik:gridboundcolumn>                                 <telerik:gridboundcolumn uniquename="provider_name" datafield="provider_name" headertext="provider">                                 </telerik:gridboundcolumn>                             </columns>                             <detailtables>                                 <telerik:gridtableview commanditemdisplay="top" datakeynames="product_id" name="producttableview"                                     showheaderswhennorecords="true" editmode="editforms" showfooter="true" >                                      <commanditemtemplate>                                         <table width="100%">                                             <tr>                                                 <td align="left" style="padding-left: 8px;" valign="middle">                                                     <asp:imagebutton id="adddetailtable_btn" commandname="initinsert"  runat="server"                                                         imageurl="~/images/add.gif" />&nbsp; add                                                 </td>                                             </tr>                                         </table>                                     </commanditemtemplate>                                     <columns>                                         <telerik:gridbuttoncolumn buttontype="imagebutton" imageurl="../../../images/erase12.png"                                             headertext="remove" commandname="delete">                                         </telerik:gridbuttoncolumn>                                         <telerik:grideditcommandcolumn buttontype="imagebutton" editimageurl="../../../images/edit.gif">                                         </telerik:grideditcommandcolumn>                                         <telerik:gridboundcolumn uniquename="row_id" datafield="row_id" display="false">                                         </telerik:gridboundcolumn>                                         <telerik:gridboundcolumn uniquename="product_id" datafield="product_id" display="false">                                         </telerik:gridboundcolumn>                                          <telerik:gridboundcolumn uniquename="product_name" datafield="product_name" headertext="products">                                         </telerik:gridboundcolumn>                                         <telerik:gridboundcolumn uniquename="min_quantity" datafield="min_quantity" headertext="minimum quantity">                                         </telerik:gridboundcolumn>                                         <telerik:gridboundcolumn uniquename="max_quantity" datafield="max_quantity" headertext="maximum quantity">                                         </telerik:gridboundcolumn>                                         <telerik:gridboundcolumn uniquename="comission" datafield="discount_value"                                             headertext="comission">                                         </telerik:gridboundcolumn> 


   <script type="text/javascript">     function hierarchyexpanded(sender,args)   {      // how can expended row providerid in here    } 

any apriciated

please try below code snippet.

js

function hierarchyexpanded(sender, args) {             alert(args.get_griddataitem().getdatakeyvalue("provider_id"));         } 

.aspx

<mastertableview clientdatakeynames="provider_id" hierarchyloadmode="client"> 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -