Getting DataKeyField value in jquery

2 posts, 0 answers
  1. Katia
    Katia avatar
    5 posts
    Member since:
    Mar 2008

    Posted 15 Aug 2014 Link to this post


    I'm binding the RadListBox to a Collection<T> and setting DataValueField, DataTextField and DataKeyField. I have no problems getting the value and text client-side using jquery, but there doesn't seem to be way to get the key value. One workaround I've found is to manually add a "key" attribute during the ItemDataBound event and then using get_attributes() client-side, but I was wondering if there was a built-in way of doing this without having to hook up the ItemDataBound event.

    Thank you,
  2. Bozhidar
    Bozhidar avatar
    1189 posts

    Posted 20 Aug 2014 Link to this post

    Hello Katia,

    The DataKeyField is used internally for database operations, and is not accessible through the API, so you would have to use the attributes approach if you want to access it's value.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top