Client - Get value of field on same row as another item?

2 posts, 0 answers
  1. Keith
    Keith avatar
    26 posts
    Member since:
    Jan 2013

    Posted 09 Oct 2019 Link to this post

    I have a RadListView similar to

    <telerik:RadListView ID="RadListView1" runat="server" >
        <ItemTemplate>
            <asp:HiddenField ID="HiddenField1" runat="server" Value='<%#Eval("HiddenValue") %>' />
            <telerik:RadNumericTextBox ID="RadTextBox1" runat="server" ClientEvents-OnValueChanged="onValueChanged" DbValue='<%#Eval("Hours") %>' />
        </ItemTemplate>
    </telerik:RadListView>

     

    This data is bound server-side from another control.  There may be hundreds of lines with unique values.  When the text is changed in the RadNumericTextBox I wish to manipulate the data using the value in HiddenField1 in the onValueChanged function.

     

    For example, when typing "5" into the RadTextBox1, onValueChanged will fire, and I would like to discover the value of HiddenField1 in this function.  I cannot seem to pin down how to access data in the specific row that I am accessing.

     

     

  2. Eyup
    Admin
    Eyup avatar
    4046 posts

    Posted 14 Oct 2019 Link to this post

    Hello Keith,

     

    You can check the provided RadDataForm sample here to achieve this requirement:
    https://www.telerik.com/support/kb/aspnet-ajax/media-player/details/accessing-controls-in-listview

    This requirement can be achieved both on client and server-side. In this case you will need the client-side approach, which will include the $telerik.findElement() method since the HiddenField is an asp:Control.  If you prefer, I can prepare a new sample targeting your scenario specifically.

     

    Regards,
    Eyup
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top