title in listbox

3 posts, 0 answers
  1. appdev
    appdev avatar
    223 posts
    Member since:
    Sep 2008

    Posted 12 Jul 2009 Link to this post

    hey guys, i was just wondering if there's a way for us to have header for the listbox and don't allow users to select the header. and when you move item from listbox2 back to listbox1, that item goes into the right section like this

    section1
        1
         2
    section2
         3
         4

    then say you move 1 and 3 to listbox 2, that's fine. header will stay the same, you can't move header section1 and section2. then when you move 1 and 3 back to listbox1, it will go into the correct section. if there's a way please let me know. thanks
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 15 Jul 2009 Link to this post

    Hello Duy,

    RadListBox does not support such Group (Header) Items out-of-the-box.

    Alternatively you can use Templates (for those Header Items) to visually differentiate them from other Items. Then you can handle the client-side SelectedIndexChanging event and cancel it if a Header Item has been clicked (Header Items could have unique values, e.g. -1).

    As for transferring back an Item to the source ListBox you can handle the client-side Transferred event and then reorder the Transferred Item(s) to their respective Group.

    Please see the Templates demo or the related help article for more information. 

    The SelectedIndexChanging event is not yet documented, still it is identical to SelectedIndexChanged with the only difference that it can be canceled (eventArgs.set_cancel(true)).

    I hope this gets you started.

    Greetings,
    Simon
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 20 Jul 2009 Link to this post

    A little addition - (I have some "unmoveable" items in my boxes where I use this) you could set the "header" to Enabled="false".
Back to Top