using vs2010, c#, MVC3, and Razor;
I have an igCombo that pulls data by specifying the datasource. If there is data, all works as intended. However, if the result is empty, there is an error the first time you try to drop down the list: "Invalid Argument"
The view code looks like this:
@(Html.Infragistics().Combo() .ID("igComboID") .TextKey("Name") .Width("200") .ValueKey("TableID") .AllowCustomValue(false) .EnableClearButton(false) .Mode(Infragistics.Web.Mvc.ComboMode.DropDown) .MultiSelection(Infragistics.Web.Mvc.ComboMultiSelection.Off) .DataSourceUrl(Url.Action("GetMyData")) .DataBind() .Render())
The Controller code looks like this: [ComboDataSourceAction]public ActionResult GetMyData(){ var myData = from d in db.GetMyData where 1 == 2 select d; return View(myData.AsQueryable());}
The 1 == 2 ensures an empty data set.
Thanks,Tony