radlistbox

4 posts, 0 answers
  1. justin coon
    justin coon avatar
    36 posts
    Member since:
    May 2006

    Posted 11 Mar 2007 Link to this post

        Hello,

    can someone help me to give multiple columns in a lisbox. columns that display properties of an object that its bound to? is this possible?
    also i would like to know how i could display images in the listbox along with the multiple columns of the listboxitems. the listbox will be bound to a collection of custom business objects

    justin
  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 12 Mar 2007 Link to this post

    Hi justin,

    Currently RadlistBox does not support multi-columns view. This feature is logged in our to-do list and it will be rolled out soon.

    Nevertheless, you are free to create the items of the list box, and set their properties in code. You will also be able to set the Text and image as needed, albeit the missing multi-column interface.
     

    All the best,
    Mike
    the telerik team
  3. justin coon
    justin coon avatar
    36 posts
    Member since:
    May 2006

    Posted 12 Mar 2007 Link to this post

    Mike,

    it would be awesome if you could post me a sample code with the latest edition of the Win Controls displaying how to do this..

    i'd really like to use the radlistbox with its awesome styles instead of resorting to the .net 2.0 listview to display multiple columns for each listitem
  4. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 13 Mar 2007 Link to this post

    Hi justin,

    I think that you will find the appropriate information on how to bind RadListBox in our QSF examples (r.a.d.uielements -> List Box -> Data Binding). Take a look at the binding to array and especially binding to a source of custom objects (Customer class) examples. 

    However, no matter how you would implement the binding in your case, you will have only the Text property of the listbox items bound to the source. If you also want to set images to the items in the listbox you should set them in the code at runtime. For more information, please take a look at the "Music Collection" example of RadComboBox. Just like in the example, you could use the ItemDataBound event of RadListBoxElement which you could get like this:

    RadListBoxElement listBoxElement = radListBox1.Radioelement.Children[0] as RadListBoxElement; 

    I hope this information helps. We will try to enhance the documentation on the topic.


    Georgi
    the telerik team
Back to Top