This is a migrated thread and some comments may be shown as answers.

radlistbox

3 Answers 212 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
justin coon
Top achievements
Rank 1
justin coon asked on 11 Mar 2007, 08:20 AM
    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

3 Answers, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 12 Mar 2007, 08:20 AM
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
0
justin coon
Top achievements
Rank 1
answered on 12 Mar 2007, 08:16 PM
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
0
Georgi
Telerik team
answered on 13 Mar 2007, 06:08 PM
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
Tags
General Discussions
Asked by
justin coon
Top achievements
Rank 1
Answers by
Mike
Telerik team
justin coon
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or