Creating a dropdownlist with a Guid as id

2 posts, 0 answers
  1. Jean-François
    Jean-François avatar
    26 posts
    Member since:
    Dec 2012

    Posted 11 Jul 2013 Link to this post


    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")) _

    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 ?
  2. Daniel
    Daniel avatar
    2231 posts

    Posted 15 Jul 2013 Link to this post


    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?

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top