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
I am using a nearly identical syntax to the example above but my problem is that the DataSourceURL is never called. I have a grid on the same page using the same syntax and it works fine but if I set a breakpoint in the ActionResult method being used by the combo box it simply never executes.
Any guideance on what I might be missing?
Hello Anthony,
I tried to reproduce your problem, but with no success.
Can you provide me with more info about your test scenario like:
Best Regards,
Martin Pavlov
Infragistics, Inc.
Hello erk,
I guess you're using NA for jQuery 11.2 (without the service release)? If so I suggest to update your version with the latest service release.
I guess the behavior you're experiencing was a bug in the MVC wrapper in 11.2, but didn't find internal ticket on the subject. Hopefully it was fixed in the service release.
Hope this helps,
Hello Martin,
Thanks for getting back with me.
I am using NA 2011.2 with the SR. The DLL version shows: 3.11.2.2045
I did sync all JS files to be what was provided/updated after applying the SR.
The invalid argument is raised in the client when attempting to drop down the empty combo box, but only the first time. The error message points to line 18, char 20286 of http://localhost.:16759/Scripts/jquery-1.6.2.min.js
So, is there an issue with 1.6.2 of jquery with the new release?
I tested it with jquery 1.6.2, but still works. What about jqueryui version?Here are my test bed includes:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script><script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script> <script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" type="text/javascript"></script> <script src="http://cdn-na.infragistics.com/jquery/20112/2045/js/combined/min/ig.ui.min.js" type="text/javascript"></script> <script src="http://cdn-na.infragistics.com/jquery/20112/2045/js/combined/min/ig.ui.combo.min.js" type="text/javascript"></script> <link href="http://cdn-na.infragistics.com/jquery/20112/2045/themes/min/ig/jquery.ui.custom.min.css" rel="stylesheet" type="text/css" /> <link href="http://cdn-na.infragistics.com/jquery/20112/2045/themes/min/base/ig.ui.min.css" rel="stylesheet" type="text/css" />
Best regards,Martin Pavlov