easyui-DataGrid基本用法

$('#dg').datagrid({
                    //url: "",
                    title: '  客户列表',
                    iconCls: 'icon-customer',

                    fit: false,
                    fitColumns: true,
                    //remoteSort: false,
                    idField: "ID",
                    method: 'get',
                    //onClickRow: onClickRow,
                    onDblClickRow: onClickRow,
                    //striped: true,
                    
                    rownumbers: true,
                    //singleSelect: true,
                    scrollbarSize: 1,
                    selectOnCheck: true,
                    autoRowHeight: false,
                    toolbar: "#tb",
                    emptyMsg: '没有更多数据',

                    columns: [[
                     {field:'ID',checkbox:true},  
                    { field: 'CustomerNo', title: '客户编号', width: 200, align: 'center',editor:'text'},
                    { field: 'ShortName', title: '客户简称', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                    { field: 'FullName', title: '客户全称', width: 200, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                    {
                        field: 'Currency', title: '结算币别', width: 100, align: 'center',
                        editor:
                            {
                                type: 'combobox', options: {
                                    valueField: 'value',
                                    textField: 'text',
                                    required: true,
                                    data: [
                                        { value: "USD", text: "USD" },
                                        { value: "JPY", text: "JPY" },
                                        { value: "RMB", text: "RMB" },
                                        { value: "HKD", text: "HKD" },
                                    ]
                                }
                            }
                    },
                    { field: 'Saler', title: '营业担当', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                     { field: 'Phone', title: '联系电话', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                     { field: 'Mail', title: '联系邮箱', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                    { field: 'Address', title: '地址', width: 100, align: 'center', editor: { type: 'validatebox', options: { required: true } } },
                    { field: 'Remark', title: '备注信息', width: 100, align: 'center', editor: 'text' },
                    {
                        field:"linkid",
                        title: '操作', width: 100, align: 'center',
                        formatter: function (value, row, index) {
                            var currid = row.ID;
                            return "<a href='add.html?id=" + currid + "'>编辑</a>&nbsp;&nbsp;<a href='javascript:void' class='list_del_a' d='" + currid + "'>删除</a>";
                        }
                    }
                    ]]

                });
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值