jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Loading data into grid from database
Tagged: angular grid, bind to database, data grid, grid, jquery grid, jqxgrid, JSP, Struts 2
This topic contains 9 replies, has 4 voices, and was last updated by Dimitar 8 years, 10 months ago.
-
Author
-
I need to load the data from database and show the content in grid which i can edit and use in form or save it back to database.
I checked the demo files for binding data but cannot set the response to the grid.Hello nitin7988,
In the following help topics you can learn how to load data into grid from:
-MySql database using PHP:http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/bind-jquery-grid-to-mysql-database-using-php.htm;
-SQL Database using ASP.NET MVC4: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp.net-integration/asp.net-binding-to-sql-database-mvc4.htm.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Thanks Nadezhda
I’m using mysql with jsp in struts2 framework can u help me with it.Hi nitin7988,
Unfortunately, we don’t have examples with MySql and JSP Struts 2.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/OK Nadezhda,
I worked on that by calling a jsp file using url,the result is shown in console but im not able to get response. It shows “syntax error unexpected token <” . Can Someone help.Hi nitin7988,
This is insufficient for us to determine the issue. Please, provide us with the whole result from your console.
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Using url im calling a jsp file and setting the response in that file
In the console im getting this
[{“mno”:”100000″,”menu_name”:”General”,”func”:””},{“mno”:”100100″,”menu_name”:”Queries”,”func”:”n”},{“mno”:”100101″,”menu_name”:”Available”,”func”:”n”}]Im setting response using following lines of code
out.println(cellarray);
response.setContentType(“application/json”);
response.getWriter().write(cellarray.toString()); //cellarray is a json arraybut i could not load the grid data by this method.
If i put the console data in txt file and load it directly it works.
I think that the problem is of sending data.Hi nitin7988,
Your code looks correct. It seems the issue is in your side.
Please, find the following topic which contains more information about loading data in dataAdapter with jsonp: http://www.jqwidgets.com/community/topic/binding-dropdownlist-to-jsonp/#post-21580.Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi nitin7988,
Finally what method did you use to implement (Sturts2 with jqxgrid)?
Can you give an example of it here on the site?Best Regards,
SamanHello Saman,
Unfortunately, we do not have experience with Struts 2. However, we have JSP integration examples that may be helpful to you. You can find them in the Java Integration section of the documentation.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.