jq easy-uidatagridのいくつかの使用法



Some Usages Jq Easy Ui Datagrid



まず、対応するcssとJSを紹介します

$('#tt').datagrid({ url: '/UserInfo/UserInfoList', Title: 'user data table', width: 700, height: 400, fitColumns: true, //column adaptive nowrap: false, idField: 'ID', / / ​​list of primary key columns loadMsg: 'Loading user's information...', Pagination: true, / / ​​whether there is paging singleSelect: false, / / ​​single row selection pageSize: 10, / / ​​page size, how many pieces of data pageNumber: 1, / / ​​current page, the default pageList: [10, 20, 50], queryParams: {}, / / ​​pass parameters to the background columns: [[//c.UserName, c.UserPass, c.Email, c.RegTime { field: 'ck', checkbox: true, align: 'left', width: 50 }, { field: 'ID', title: 'number', width: 80 }, { field: 'UserName', title: 'name', width: 120 }, { field: 'UserPass', title: 'password', width: 120 }, { Field: 'RegTime', title: 'time', width: 80, align: 'right', formatter: function (value, row, index) { / / In the returned json data format, the date format needs to be newly formatted in order to display return (eval(value.replace(//Date((d+))//gi, 'new Date($1)'))).pattern('yyyy-M-d') } } ]], toolbar: [{ id: 'btnGet', Text: 'delete', iconCls: 'icon-add', handler: function () { var rows = $('#tt').datagrid('getSelections') if (!rows || rows.length==0) { $.messager.alert('Hint', 'Please select the data to delete', 'error') return } var strId = '' for (var i = 0 i

最初の単語データグリッド



データグリッドでpageindexを取得します。pagesizeに対応する属性はpage、rowsです。
//データグリッドで返されるJSONデータは、合計2つのプロパティ行を返す必要があります