jQWidgets Forums
jQuery UI Widgets › Forums › Grid › webapi?
Tagged: jQuery Widgets, jqxgrid
This topic contains 7 replies, has 2 voices, and was last updated by ulao 12 years, 1 month ago.
-
Authorwebapi? Posts
-
Seem the jqWidgets do not work from an webapi host. I get the $.jqx is undefined error at spreadSheet.js:40. I tested all my includes to be working. I can run my spreadSheet example off line just not on the webapi page. Is there something about webapi that does not work with jqwidgets?
Hi ulao,
Please, check whether you use jQuery version 1.7+. And also please, check whether all required files are referenced correctly in your project.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThe example I have is 1.8.2.min. Both projects are the same and have these files included.
… strange when I put my code in here it disappears? Anyways its untouched from the example.
hi ulao,
If you get $.jqx is undefined, then the files are not correctly referenced. I do not see a different reason.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comwell here is why I dont agree, please correct my thinking if I’m wrong.
1) as it is I get one error about $.jqx is undefined
2) If I remove my jquery reference I get 12 errors about jquery missing and one about $ missing
3) if I remove the jqxcore reference I get 11 errors $.jqx is undefined
4) Intelesense finds jqx. ( I know that does not mean much )Like wise for each other file. MY thinking is that they must be referenced right or I would be getting more errors, as prof by removing the lines as I stated above. If the project is moved offline ( not on the web api server ) then all is fine. So its my suspicion that its a web api thing. Another tid-bit I found, not related to jqwidgets, is that the $(‘…’).bind(‘dragstart’…) also fails on web api where is does not fail off line. I’m starting to think there is some sort of conflict between webapi and jquery. I only mention this in hopes it give you a thought.
Does jqwidgets have many webapi users?
also what does this mean?
MVC4 Web Api Service Layers for the jqwidgets project on http://www.jqwidgets.com.Until now implemented the GET method, GET/id method.
New DataPoint csv repository.removing the ” $(document).ready(function () {” allow the the code to execute no jqx errors but no spread sheet shows up, again I think its the $(…) stuff. Where ever I use that on webapi its ignored.
unless you have a thought ill go bug webapi, and get nowhere as usual.
Hi ulao,
jqxcore.js is a file which is always required. Initialization of the widgets should be done in the document.ready function. jqx.base.css is a required file, too. When you work with jqxgrid, the jqxscrollbar.js, jqxbuttons.js, jqxmenu.js, jqxgrid.js and jqxdata.js are always required, too. If you work with MVC4, check this help topic which demonstrates how to create and populate a Grid: asp.net-binding-to-sql-database-mvc4.htm.
Our widgets required version of jQuery 1.7+, because they use “on” for subscribing to events. “bind” is deprecated and should not be used with our widgets.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comwell that was a bit of an over kill but in doing this tut’ I found the issue. I needed to add
@{
ViewBag.Title = “Index”;
}
@section scripts
{
…
}I have no idea what this is for or why it worked but this is all I needed to do.
-
AuthorPosts
You must be logged in to reply to this topic.