javascript - How to create jquery Jtable dynamically -
i have dynamically create jquery jtable based on columns selected user. till have done hardcoding column names , firing ajax data displayed in jtable.
how create dynamically ?
here js sample code.
<script type="text/javascript"> $(document).ready(function () { $('#studenttablecontainer').jtable({ title: 'the student list', paging: true, //enable paging pagesize: 10, //set page size (default: 10) sorting: true, //enable sorting defaultsorting: 'name asc', //set default sortin fields: { studentid: { key: true, create: false, edit: false, list: false }, name: { title: 'name', width: '23%' }, emailaddress: { title: 'email address', list: false }, } }); </script>
html
<div id="studenttablecontainer"></div>
Comments
Post a Comment