Show Posts
|
Pages: [1] 2
|
3
|
General Category / EasyUI for jQuery / Use DataGrid, set pagination="true", but pagination is error
|
on: January 12, 2015, 11:56:06 PM
|
I set pagination="true" , the pager is show , but show all data; and change the page,the data is not refresh, but rownumber is refresh. the code : <table id="partdg" class="easyui-datagrid" style="height:500px;" data-options="rownumbers:true,singleSelect:true,url:'/Part/GetAllPart' " sortName="part_code" sortOrder="asc" rownumbers="true" pagination="true"> <thead> <tr> <th data-options="field:'ck',checkbox:true"></th> <th data-options="field:'part_code',width:80,sortable:'true'" >物料编码</th> <th data-options="field:'name_en',width:180,sortable:'true'">英文名称</th> <th data-options="field:'name_ch',width:180,sortable:'true'">中文名称</th> <th data-options="field:'spec_en',width:280,sortable:'true'">英文规格</th> <th data-options="field:'spec_ch',width:280,sortable:'true'">中文规格</th> </tr> </thead> </table>
|
|
|
4
|
General Category / EasyUI for jQuery / Can I use FormCollection to get the DataGrid's row in controller's action?
|
on: January 06, 2015, 10:45:43 PM
|
In C#, MVC。 There is a [HttpPost] Controller's Action, define FormCollection to get the values of form 。 when the view submit,can not get values. controller's action [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create(FormCollection s) { string sd = s.ToString(); return View(); }
Create.cshtml code $("#bomdg").datagrid({ toolbar: '#tb', singleSelect: true, onClickRow: onClickRow, columns: [[ { title: 'material', field: 'pdm_bomdetail_tb_id_part', width: 180, formatter: function (value, row) { return row.name; }, editor: { type: 'combobox', options: { valueField: 'id', textField: 'name', method: 'get', url: '/Bom/GetPartData', required: true, missingMessage: 'request', onSelect: function (value) { var row = $("#bomdg").datagrid('getSelected'); var rindex = $("#bomdg").datagrid('getRowIndex', row); bomver = $('#bomdg').datagrid('getEditor', { index: rindex, field: 'pdm_bomdetail_tb_id_part_bom' }); if (value.id == '') return; $.getJSON('/Bom/GetPartBom', { partid: value.id }, function (data) { bomver.target.combobox('loadData', data); bomver.target.combobox("setValue", ""); edv = $('#bomdg').datagrid('getEditor', { index: rindex, field: 'bom_version' }); $(edv.target).textbox('setValue', ""); }); $.getJSON('/Bom/GetSinglePart', { partid: value.id }, function (data) { var edc = $('#bomdg').datagrid('getEditor', { index: rindex, field: 'part_code' }); $(edc.target).textbox('setValue', data[0].code);
var edn = $('#bomdg').datagrid('getEditor', { index: rindex, field: 'part_name' }); $(edn.target).textbox('setValue', data[0].name); }); } } } }, { title: 'material_code', field: 'part_code', width: 80, editor: { type: 'textbox', options: { readonly: true } } }, { title: 'material_name', field: 'part_name', width: 180, editor: { type: 'textbox', options: { readonly: true } } }, { title: 'BOM_code', field: 'pdm_bomdetail_tb_id_part_bom', width: 120, formatter: function (value, row) { return row.bomname; }, editor: { type: 'combobox', options: { valueField: 'id', textField: 'name', data: databom, onSelect: function (value) { var row = $("#bomdg").datagrid('getSelected'); var rindex = $("#bomdg").datagrid('getRowIndex', row); if (value.id == '') return; $.getJSON('/Bom/GetBomVersion', { bomid: value.id }, function (data) { var edc = $('#bomdg').datagrid('getEditor', { index: rindex, field: 'bom_version' }); $(edc.target).textbox('setValue', data[0].code); }); } } } }, { title: 'BOM Version', field: 'bom_version', width: 80, editor: { type: 'textbox', options: { readonly: true } } }, { title: 'qty', field: 'pdm_bomdetail_tb_qty', width: 80, editor: { type: 'numberbox', options: { precision: 4, min: 0, required: true, missingMessage: 'request' } } } ]] });
|
|
|
9
|
General Category / EasyUI for jQuery / HELP: no set the menu's icons, but the menu shows icons
|
on: January 04, 2015, 05:45:14 PM
|
there are three attachments. "menushow.jpg" is the result,the first level menu show the icons. "copydata.html" is the main file, it use "appmenu.js" for init menu. in code,no set the menu's icons,but in the view, the menu show icons. How can I do? in "copydata.html", please change <script src="D:/appmenu.js"></script> for your dir. <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> <script src="D:/appmenu.js"></script> </head>
|
|
|
13
|
General Category / EasyUI for jQuery / why the datagrid's filter editor have a "x"(delete all)
|
on: December 30, 2014, 02:01:37 AM
|
please see the attachment,it is the screen copy. <table id="DataSelect" title="请选择" style="width: 800px; height: 600px" data-options="rownumbers:true,singleSelect:true,method:'get',remoteSort:false,sortName:'code',sortOrder:'asc',loadMsg:'请在加载数据,请等待...'" ></table> <script> //var dg = $('#DataSelect'); //dg.datagrid(); // create datagrid //dg.datagrid('enableFilter'); // enable filter
$('#DataSelect').datagrid({ url: getdata_url, columns: [[ { field: 'ck', checkbox: true }, { field: 'name', title: '名称', width: 200, sortable: true }, { field: 'code', title: '编码', width: 100, sortable: true }, { field: 'desc', title: '描述/备注', width: 420, sortable: true } ]] });
var dg = $('#DataSelect').datagrid(); dg.datagrid('enableFilter'); </script>
|
|
|
|