This question is locked. New answers and comments are not allowed.
Hi!
I am using Telerik MVC Autocomplete with in strongly type (Travel) editor template view with razor syntax.
Editor template is called from Telerik MVC grid (Travel list).
When I use basic Autocomplete paremeters everything works fine but when I add Multiple (or Filterable options) with lambda expressions (see code below) I got "Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type" error in Visual Studio editor and debugger.
Travel editor template autocomplete code:
Name: Destination (string field in Travel entity)
BindTo: ViewBag.Destinations (IEnumerable list of strings - names of all destinations)
Value: ViewBag.DestinationsFromDatabase (string value of existing destinations in Travel entity)
When I remove ".Multiple..." autocomplete works ok but when I add multiple parameter with lambda expression I got "Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type" error.
Please help!
Thanx!
I am using Telerik MVC Autocomplete with in strongly type (Travel) editor template view with razor syntax.
Editor template is called from Telerik MVC grid (Travel list).
When I use basic Autocomplete paremeters everything works fine but when I add Multiple (or Filterable options) with lambda expressions (see code below) I got "Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type" error in Visual Studio editor and debugger.
Travel editor template autocomplete code:
@(Html.Telerik().AutoComplete() .Name("Destination") .BindTo(ViewBag.Destinations) .AutoFill(true) .HighlightFirstMatch(true) .Value(ViewBag.DestinationsFromDatabase) .Multiple(multi => { multi.Separator(",").Enabled(true); }) )Name: Destination (string field in Travel entity)
BindTo: ViewBag.Destinations (IEnumerable list of strings - names of all destinations)
Value: ViewBag.DestinationsFromDatabase (string value of existing destinations in Travel entity)
When I remove ".Multiple..." autocomplete works ok but when I add multiple parameter with lambda expression I got "Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type" error.
Please help!
Thanx!