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

[Solved] Can we pass SelectItemList's 'selected value' instead of 'selected index'

1 Answer 59 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Narayanarao
Top achievements
Rank 1
Narayanarao asked on 03 Jan 2012, 01:53 PM
Hi Telerik team,

to my combo box, i wish to pass a selectItemList's selected value instead of selected Item is this possible.

snippet below

@(Html.Telerik().ComboBox()
                        .Name("TestComboBox").AutoFill(false)
                        .AutoFill(true)
                        .BindTo(new SelectList(Model.SampleModel, "Value", "Text"))
                        .SelectedIndex(Model.SampleModel.selectedPartnerTypeIndex)

thnx,
anand

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 04 Jan 2012, 05:50 PM
Hello,

One possible option is to use this overload of the SelectList. The other option is to use Value() method of the combobox.
 
Kind regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
ComboBox
Asked by
Narayanarao
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or