Table Plugin for Displaying JSON Data
Add-ons

Plugin Description: mmGrid
Column names and the corresponding JSON values for each column
1 2 3 4 5 6 7 8 9 10 11 | var cols = [ { title:'ID', name:'id' ,width:100, align:'center' }, { title:'User ID', name:'user_id' ,width:100, align:'center' }, { title:'APPID', name:'app_id' ,width:100, align:'center'}, { title:'Game Source', name:'from_app_id' ,width:100, align:'center'}, { title:'Reward Status', name:'status' ,width:100, align:'center'}, { title:'Time', name:'dt' ,width:200, align:'center'}, { title:'Actions', name:'' ,width:150, align:'center', lockWidth:true, lockDisplay: true, renderer: function(){ return '<button class="btn btn-info">View</button> <button class="btn btn-danger">Delete</button>'} }]; |
AJAX Request
1 2 3 4 5 6 7 8 9 10 11 12 | var mmg = $('#active-info').mmGrid({ cols: cols, url: 'adwall/activeList', params: {"appid":null,"status":null,"from_app_id":null}, width: 'auto', height: '500px', sortName: 'id',// Sort by ID method: 'get', // Request Method multiSelect: true,// Multiple Selection checkCol: true, // Checkbox Column indexCol: true // Index Column}); |
评论