Select allready Selected item event

2 posts, 1 answers
  1. Mark
    Mark avatar
    36 posts
    Member since:
    Mar 2014

    Posted 21 Apr 2015 Link to this post

    Hello.

    My problem is I need to act clientwise on users "reselecting" an item in my radcombo with keystroke.

    I.e:
    -----------------------------------------------------------

    if user select A > fire a client function.
    if user select A again > fire a client function

     ----------------------------------------------------------

    I can handle the mouseclick event by adding onclick event to the specific RabcomboboxITem ("A"). It works fine. 

    I can handle Keystroke select (first time!), by using onClientIndexChanged. It works fine

    I can handle Keystroke REselect, by using OnClientKeypressing. It works fine

    Troubles start if user selects other item (away from "A").
    Now my OnClientKeypressing  event (which fires BEFORE selectionchange)  only sees "A" pressed and wrongfully fires my client function.

    Any clues to a solution are appreciated

     

    Regards

     Mark



  2. Answer
    Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 24 Apr 2015 Link to this post

    Hi Mark,

    To prevent the OnClientSelectedIndexChanged firing, try to handle and cacenl the OnClientSelectedIndexChanging event.

    function onClientSelectedIndexChanging(sender, args) {
        if (true) {
            args.set_cancel(true);
        }
    }


    Regards,
    Hristo Valyavicharski
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

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