Is there a way to get previously selected item?

3 posts, 0 answers
  1. Ed
    Ed avatar
    5 posts
    Member since:
    Oct 2008

    Posted 13 Nov 2008 Link to this post

    Hi,
    I'd like to be able to catch the onClientItemClicking event and be able to determine what the previously selected item was. Is this possible? Also, if it is, I would like to fire a server side event based on what the previous selected item was.
    Basically, what I am trying to do is to do an automatic "save" on whatever it is that they were working on prior to navigating someplace else.
    Thanks ... Ed
  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 14 Nov 2008 Link to this post

    Hey Ed,

    My guess would be to store the value of the selected item into a hidden field that you can pull out later, something along the lines of...

    <user click>

    if hiddenfield has value, run through code relating to previous item

    set hiddenfield value to itemclicked

    do whatever other click logic there was

    Carries your value through post-back, lets you react based on previous item, and after the first click you'll always have that value saved moving forward.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ed Staffin
    Ed Staffin avatar
    66 posts
    Member since:
    Nov 2008

    Posted 14 Nov 2008 Link to this post

    Yeah, that was my fallback. I guess I was hoping there might be something built in. No biggie.
    Thanks ... Ed
Back to Top