EasyUI Forum
September 13, 2025, 09:02:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2
1  General Category / EasyUI for jQuery / Re: Use DataGrid, set pagination="true", but pagination is error on: January 21, 2015, 05:31:03 PM
no set the pageSize , it use default value.
2  General Category / EasyUI for jQuery / Re: Use DataGrid, set pagination="true", but pagination is error on: January 12, 2015, 11:56:59 PM
screen copy.
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 :
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
Code:
[HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Create(FormCollection s)
        {
            string sd = s.ToString();
           
            return View();
        }

Create.cshtml code
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' }
                }
            }
        ]]
    });
5  General Category / EasyUI for jQuery / Re: HELP: no set the menu's icons, but the menu shows icons on: January 06, 2015, 01:38:13 AM
thanks.
I forget there are the code in AddChildMenu
6  General Category / EasyUI for jQuery / Re: HELP: no set the menu's icons, but the menu shows icons on: January 06, 2015, 01:15:17 AM
Help me,please.
7  General Category / EasyUI for jQuery / Re: why the datagrid's filter editor have a "x"(delete all) on: January 05, 2015, 07:51:21 PM
error?
8  General Category / EasyUI for jQuery / Re: I don't set the menu icons, but there are show icons on: January 04, 2015, 05:51:01 PM
see attachment file, the red cycle.
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.

Code:
<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>
10  General Category / EasyUI for jQuery / Re: why the datagrid's filter editor have a "x"(delete all) on: January 03, 2015, 10:49:21 PM
in firefox,the header are too loose than column's width.
see attachment
11  General Category / EasyUI for jQuery / Re: why the datagrid's filter editor have a "x"(delete all) on: January 03, 2015, 06:13:15 PM
please help.
thanks.
12  General Category / EasyUI for jQuery / Re: How copy rows from a datagrid to other datagrid? on: December 31, 2014, 01:36:05 AM
OK,thanks.
By the way, which document or other , I can get like this method and use it.          ndg.datagrid('loadData', $.extend(true,[],rows)); 
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.


Code:
<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>
14  General Category / EasyUI for jQuery / How copy rows from a datagrid to other datagrid? on: December 30, 2014, 12:58:41 AM
copy rows from a datagrid to other datagrid,
please see the attachment for detail.

there are the code:
            var row = $('#dg').datagrid('getRows');
            var jsonObject = JSON.stringify(row);
            var ndg = $('#newdg').datagrid();
            ndg.datagrid('loadData', jsonObject);
15  General Category / EasyUI for jQuery / Re: How can I get the validate status of datagrid's rows on: December 29, 2014, 06:37:38 PM
OK, thanks.
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!