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

Detail Table itemTemplate javascript getParentRow

3 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jota
Top achievements
Rank 1
Jota asked on 08 Jun 2015, 05:40 AM

Hi!!

I'm working with RadGrid in hierarchy mode. On DetailTable I have a CommadItemTemplate with an asp:button:

 

<DetailTables> 
<CommandItemTemplate>
   <asp:ImageButton ID="IbB_" ImageUrl="../../Img/b_.gif" CommandName="AContact" runat="server" onClientClick="b_();" />
</CommandItemTemplate>

<...>

I need to get the Parent ID in client side (JS) how i can do?

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Jota
Top achievements
Rank 1
answered on 10 Jun 2015, 11:46 AM
Pleade, anybody can help me?
0
Eyup
Telerik team
answered on 11 Jun 2015, 06:13 AM
Hi Jota,

You can use the following syntax to achieve this requirement:
<asp:ImageButton ...
    OnClientClick='<%# "imageButtonClick(\"" + Container.OwnerTableView.ParentItem.GetDataKeyValue("OrderID")
+ "\"); return false;"%>' />

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jota
Top achievements
Rank 1
answered on 12 Jun 2015, 09:37 AM
it's works!!!! Thanks!
Tags
Grid
Asked by
Jota
Top achievements
Rank 1
Answers by
Jota
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or