Listbox feature

4 posts, 0 answers
  1. James
    James avatar
    26 posts
    Member since:
    Feb 2009

    Posted 16 Jul 2009 Link to this post

    I am new to Telerik and have a basic question. Does the Winform Listbox have the same feature set as the ASP Listbox? I am looking for item reordering and the ability to transfer from one listbox to another. Thanks...
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 17 Jul 2009 Link to this post

    Hi James,

    If I have understood you correctly you want to have Drag and Drop of items in a ListBox, and between two different ListBox controls.

    In RadListBox this is not supported internally, but  we can do this very easily - the implementation is described in the Step by Step tutorial, in the RadListBox section. The full tutorial could be found at: http://www.telerik.com/support/documentation-and-tutorials/step-by-step-tutorial-for-winforms.aspx

    There you will find a description and source code of an example demonstrating how to implement drag and drop and reordering of items between listboxes.

    Feel free to contact me again, if you have another questions.


    Greetings,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. James
    James avatar
    26 posts
    Member since:
    Feb 2009

    Posted 17 Jul 2009 Link to this post

    I wasn't looking for drag and drop. The ASP listbox has the ability to display buttons that enable you to rearrange the order of items in the listbox and transfer items from listbox to another. I was wondering if this feature was available in the winforms listbox?
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 23 Jul 2009 Link to this post

    Hello James,

    Unfortunately, we do not have support for this feature built-in the listbox control. However you can always put some buttons next to the listbox and implement it on your own. You can use in the implementation the Items collection of the control and the methods of the collection such as Add, AddRange, Remove, Insert, Clear. For example pressing the "Up" button will remove the selected item from the collection and then you can insert it one index before the selected index. The "Down" button will remove the selected item and insert it one index after the selected Index.

    Feel free to write me back if you need more information.

    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top