data key value on client side on item click

2 posts, 0 answers
  1. beeta one
    beeta one avatar
    63 posts
    Member since:
    Aug 2012

    Posted 19 Oct 2012 Link to this post

    hii,
    how  can i get the datakey value on client side on item click?
     thanks..
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Oct 2012 Link to this post

    Hi Hash,

    Try setting ClientDataKeyNames Property of RadTreelist and get the value using following Javascript.

    ASPX:
    ClientDataKeyNames="ID"

    JS:
    <script type="text/javascript">
        function OnItemClick(sender,args) {
            var val = args.get_item().get_dataKeyValue("ID");
            alert(val);
        }
    </script>

    Hope this helps.

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top