I really need some help here.
I'm using MVC3 with Visual Studio 2010. with jquery 1.6.2 AND jquery-ui 1.8.14.
I have a jQuery grid on a view that will not show data even though I've verified that I'm getting data back from the database.
The grid is set up very simply (no features). It's using a datasourceURL to retrieve the data and the corresponding action is getting. When I return the view, I've tried passing in the ObjectResult (no data displayed, no errors). I've tried passing in an IQueryable, but this gives me an error in the javascript (1.6.2) that says "Microsoft JScript runtime error: The remote request to fetch data has failed: (error) undefined". This error is thrown at the point where I'm returning the view for the grid request.
If I set up a grid with the exact same parameters, but use the columns set in the demo project "Taz" created, and even use the same dataSourceURL, but change the returned data to be the auto-generated 1000 records of accounts, it works fine.
What am I missing?
Thanks,
Tony
Hi,
Could you try with jQuery 1.5 or 1.4.4 ? Several things have been broken recently in jQuery with respect to $.ajax functionality.
I doublt this is related to an issue in your MVC code.
Let me know if that works.
Angel
Hi again Tony,
our team has checked several of the MVC samples browser samples on 1.6.2, and they work fine, so it looks like the jQuery version is maybe not the issue in your case.
to isolate further the issue, i suggest you run the MVC Samples browser, and compare the view / controller definitions with your own project.
At best, some sample code snippet that you have would be of great help to us.
Thank you
I'm about to just give up on the whole thing. This has been extremely frustrating.
I can get it to work IF i first iterate through the results putting them into a list and then pass the list to the view. Like this:
var AccountList = from a in db.GetAccountList(bkNum, Serv) select a; List<Account> MyAccountList = new List<Account>(); foreach (Account item in AccountList) { MyAccountList.Add(item); } return View(MyAccountList.AsQueryable<Account>());
IF I do this, it fails:
var AccountList = from a in db.GetBankAccountList(202, 2) select a; return View(AccountList.AsQueryable<Account>());
Also, IF, as in the first example, there are no records in the database, it fails with the same error.
Thoughts?
Hi Tony,
sorry to hear that you are having troubles with this. The no records issue is something that we got reported a while ago, and fixed. I am sure if you get the first service release build you won't be experiencing this any more. Regarding the difference between the two code statements above, it kind of looks pretty identical to me, but i will have a deeper look and follow up.
Any ETA on the hotfix?
Hello Anthony,
The first service release is already available (since 11th July I think).
This service release is available under your account at the Infragistics Website.
To download the service release, log in to ‘My IG’ and select ‘Keys & Downloads’.
Select the appropriate tab for this product; then the license key.
The available service releases (Hot Fixes) should now be listed on the page.
As Angel mentioned the issues that you have reported are already fixed in the last SR
( for example : not showing the records when using 1.5.1 version of jQuery)
I have attached the new Infragistics.Web.Mvc.ll and ig.ui.min.js file in a zipped format.
Let us know if you are still able to reproduce the behavior with the latest service release
ok, installed the service release and updated my project.
However, I'm still getting the error for an empty result set (List<Account).
I updated the scripts, CSS, and the Infragistics.Web.Mvc.dll
Maybe it's the scripts?
<script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-1.8.14.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/json2.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.tmpl.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/ig.ui.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/ig.ui.grid.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/ig.ui.editors.min.js")" type="text/javascript"></script>
The error is in jquery-1.6.2.js
The message is: Microsoft JScript runtime error: The remote request to fetch data has failed: (error) undefined
If there are records in the database, then I don't get the error.
Ok, I'll work around the empty result issue. I'm also having to cast to a generic list for results to show up, but i can live with that. This product isn't going live until the end of the year so I look forward to seeing some issues resolved before then.
Thanks for the help.
Hello,
Here is the latest internal build.
hi,
the issue about the exception when there are no records in teh underlying datasource is not related to the jquery version (it's part of the server-side logic). That's fixed but it's not available in the first service release build. I am sure our development support team will be able to provide you with the internal build which has this fix as well.
Thank you,
Hello Tony,
Thank you for the fast update.
You are correct , the version of the jQuery the cause.
The first service release of the toolset is not officially tested with the 1.6.2 version
If you use v 1.4.4 for example you won't experience the issue.