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

RadDropDownListBox with 2columns

6 Answers 506 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
BB
Top achievements
Rank 1
BB asked on 10 Mar 2011, 01:50 PM

I need a RadDropDownListBox with 2 columns

Thank you very much.

Titel1 | Titel6

Titel2 | Titel7

Titel3 | Titel8

Titel4 | Titel9

Titel5 | Titel10

6 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 10 Mar 2011, 02:05 PM
Hello BB,

A RadDropDownList with more than one column is actually a different control; a  MultiColumnComboBox. Please have a look at the help topic starting here for more information.

If you need further help please let me know
Thanks
Richard
0
Brian@WTG
Top achievements
Rank 2
answered on 10 Mar 2011, 05:43 PM
I used the data set bound to the object to simulate multiple columns. The DisplayMember and ValueMember are seperate properties so you can use a multiple column display in the dropdown and auto complete while only selecting 1 real value. I created a column in the data set to return a concatenated set of columns "1XXX  |  2XXX  | 3XXX , 4XX"  with (column1 + '  |  ' + column2 + '  |  ' + column3 + ', ' + column4 as controldisplay) and set controldisplay to the DisplayMember, then set the ValueMember to column1 so when they pick one only 1XXX is returned as a value.

Speed hasn't been affected. :)
I hope that helps.
0
Richard Slade
Top achievements
Rank 2
answered on 10 Mar 2011, 05:46 PM
Hi Brian,

That's great, but the advantage of a MultiColumnComboBox is that you have all the functionality in the drop down of a RadGridView.
Regards,
Richard
0
Brian@WTG
Top achievements
Rank 2
answered on 10 Mar 2011, 06:05 PM
That's true, my example is only displaying multiple columns but you can't beat the speed of the dropdownlist (at least not yet according to the last post in my question about the multiplecolumncombobox).

You'd have to parse the selected value for the "|" char if you wanted to return multiple column values. Like 

examplesearchcode = Me.dropdown.Text.Split("|").GetValue(0).ToString.Trim

It would be a little different with multiple "|" characters, but that works for values with two columns and you want the first column. For the second column you would have to update getvalue(0) index to the position of the "|" char + 3 (for spaces). Something like

Me.dropdown.Text.Split("|").GetValue(InStr(Me.dropdown.Text, "|") + 3).ToString.Trim

 

I haven't updated my applications entirely with the new controls we got in the Telerik package yet, so I may change this once I use their gridview and the built in filter options.

Thank you

0
Martin Vasilev
Telerik team
answered on 15 Mar 2011, 08:47 PM
Hello Brian@WTG,

Thank you for sharing your code with us.

You are right that the RadDropDownList in general is faster than RadMultiColumnComboBox. And this is a normal situation of performance vs features trade off. Probably, you would like to try the RadMultiColumnComboBox of the upcoming release Q1 2011. Since we are constantly working to improve the performance of our controls, it is possible that you find the new version fast enough for your requirements. The new release will be available for download by the end of the current week.

Regards,
Martin Vasilev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Brian@WTG
Top achievements
Rank 2
answered on 15 Mar 2011, 08:53 PM
Thank you Martin, that's great to hear and I am anxious to try the multicolumncombobox again, as it formats multiple columns much cleaner.
Tags
DropDownList
Asked by
BB
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Brian@WTG
Top achievements
Rank 2
Martin Vasilev
Telerik team
Share this question
or