jquery easyui 学习总结

 $('#IDOCGrid').datagrid("hideColumn", "Deliverystorage"); //隐藏中转仓
 $('#IDOCGrid').datagrid("hideColumn", "Quotetype"); //隐藏报价类型

 

loadData

data

加载本地数据,旧的行会被移除。

 

$("#test").datagrid('loadData',data);

 

1.分页查询条件

var query={keywords:'your keywords',id:'your id'}; //把查询条件拼接成JSON
$("#test").datagrid('options').queryParams=query; //把查询条件赋值给datagrid内部变量
$("#test").datagrid('reload'); //重新加载

 

2.

解决formserver导致的问题

http://blog.csdn.net/thinkscape/article/details/7613320

http://www.cnblogs.com/aaa6818162/archive/2012/08/20/2647805.html

 

jquery easy ui嵌套布局

 

加这个div是为了form异常

<div class="easyui-panel" style="padding: 10px;" title="" fit="true" border="false">

 

 布局1

 <div region="center">
        <div class="easyui-layout" fit="true">
            <div region="north" style="height: 300px;">
                <div class="easyui-panel" style="padding: 10px;" title="" fit="true" border="false">
                    <form id="form1" runat="server">
                    <table class="mtable">
                        <tr>
                            <td style="width: 100px">
                                券类型:<span style="color: Red">*</span>
                            </td>
                            <td style="width: 250px">
                                <select id="Tickettypecode" runat="server" style="width: 250px">
                                </select>
                            </td>
                            <td style="width: 100px">
                                所属分公司:<span style="color: Red">*</span>
                            </td>
                            <td>
                                <span id="Companycode_span" runat="server"></span>
                                <input id="Companycode" type="hidden" runat="server" />
                            </td>
                        </tr>
                    </table>
                    </form>
                </div>
            </div>
            <div region="center" border="true">
                <table class="easyui-datagrid" id="datagrid2" toolbar="#toolbar" fit="true">
                </table>
            </div>
        </div>
    </div>

 

 

 布局2

 

 

 3.//去掉展开和关闭标签
                    var opts = $(this).datagrid('options');
                    var dc = $.data(this, 'datagrid').dc;
                    $.each(data.rows, function (key, temp) {
                        if (temp.SapNo == "") {
                            var index = $('#datagrid').datagrid('getRowIndex', temp);
                            var expander = dc.body1.find('div.datagrid-row-expander[row-index=' + index + ']');
                            expander.removeClass('datagrid-row-expand').removeClass('datagrid-row-collapse');
                        }
                    })

 

posted @ 2012-01-31 16:38  awp110  阅读(1099)  评论(0编辑  收藏  举报