Detail Table itemTemplate javascript getParentRow

4 posts, 0 answers
  1. Jota
    Jota avatar
    7 posts
    Member since:
    Dec 2014

    Posted 08 Jun 2015 Link to this post

    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

  2. Jota
    Jota avatar
    7 posts
    Member since:
    Dec 2014

    Posted 10 Jun 2015 Link to this post

    Pleade, anybody can help me?
  3. Eyup
    Admin
    Eyup avatar
    3754 posts

    Posted 11 Jun 2015 Link to this post

    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
  4. Jota
    Jota avatar
    7 posts
    Member since:
    Dec 2014

    Posted 12 Jun 2015 Link to this post

    it's works!!!! Thanks!
Back to Top