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

Creating a dropdownlist with a Guid as id

1 Answer 413 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jean-François
Top achievements
Rank 1
Jean-François asked on 11 Jul 2013, 08:00 PM
Hi,

I'am trying to create a dropdownlist with a guid as id : 

Dim dropDownListFor = _htmlHelper.Kendo().DropDownListFor(Of Integer)(_expression) _
                                                     .BindTo(New SelectList(_collectionValeur, "Id", "Name")) _
                                                     .HtmlAttributes(_attributsHtml)

Id is a Guid 
Name is a String

But I'm having the following error :

System.InvalidOperationException: Templates can be used only with field access, property access, single dimension array index, or single-parameter custom indexer expressions.

Any help please ?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 15 Jul 2013, 11:53 AM
Hello,

Using a Guid should not be causing the problem. The exception would be thrown if the used expression is not a valid. What is the value of the _expression parameter?

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Jean-François
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or