volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 505 forks source link

why jTable limited with pre-defined columns. #728

Open SanjayJaiswal007 opened 11 years ago

SanjayJaiswal007 commented 11 years ago

in my project, i have a requirement to write a sql query in text and based on the select query I am showing the result set in grid. In the dynamic query, the table name and result set will be changed every time, so i cannot load it with jTable. ASP.Net gridview can handled this with autogenerated column property to true but jtable doesnt have this kind of property.

Do we have these kind of auto generated property in jTable to handle any columns dynamically based on the resultset?

rsacher commented 11 years ago

My suggestion would be to dynamically write the jtable-definitions javascript. Pull your field names out of the SQL and create a string on the server-side which is the jtable-script. Write that script to the client page.

SanjayJaiswal007 commented 11 years ago

Thanks a lot for the suggestion.