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

[Solved] clashing assemblies?

1 Answer 49 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.
Alan
Top achievements
Rank 1
Alan asked on 21 Mar 2012, 12:12 AM
I have recenty upgraded to the 2012 version and keep getting this error related to the combobox:

The call is ambiguous between the following methods or properties: 'Telerik.Web.Mvc.UI.Fluent.DropDownBuilderBase<Telerik.Web.Mvc.UI.DropDownList,Telerik.Web.Mvc.UI.Fluent.DropDownListBuilder>.BindTo(System.Collections.Generic.IEnumerable<Telerik.Web.Mvc.UI.DropDownItem>)' and 'Telerik.Web.Mvc.UI.Fluent.DropDownBuilderBase<Telerik.Web.Mvc.UI.DropDownList,Telerik.Web.Mvc.UI.Fluent.DropDownListBuilder>.BindTo(System.Collections.Generic.IEnumerable<System.Web.Mvc.SelectListItem>)'

Seems like the problems relates to coexisting assemblies, but I seem to only hace the latest one referenced. Any ideas.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Zeeshan
Top achievements
Rank 1
answered on 11 May 2012, 09:30 AM
Hi

I got the same error while working on my project and get it solved. This error comes when you DO NOT provide the data to the view from the Controller.  In my case here is the code that work for me.

public ActionResult Index(FormCollection formValues)
        {
            var CountryList = GetCountryList();
            ViewBag.AllCountryList = CountryList ;

            return View();
        }

 @(Html.Telerik().DropDownList()
            .Name("ddlCountries")
            .ClientEvents(events => events
                          .OnChange("onDropDownListChange")
                          )
            .SelectedIndex(0)
            .BindTo(ViewBag.PartsList)
            .HtmlAttributes(new { style = string.Format("width:{0}px", 80) })
    )


Thats It.
Tags
ComboBox
Asked by
Alan
Top achievements
Rank 1
Answers by
Zeeshan
Top achievements
Rank 1
Share this question
or