JQuery EasyUI

<%@ Page Language="C#" MasterPageFile="~/Common.Master" AutoEventWireup="true" CodeBehind="FrmTest1.aspx.cs" Inherits="WebApp.FrmTest1" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
      
        
        
        var toolbarBtnList = [
            {text:'查询',iconCls:'icon-add',handler:function(){}},
            {text:'工具1',iconCls:'icon-remove',handler:function(){}},
            {text:'工具2',iconCls:'icon-edit',handler:function(){}},
            '-',
            {text:'刷新',iconCls:'icon-reload',handler:reloadRecord},
        ];
        
        var columnList = [[
            {field:'budgetYear', title:'年份' , width:100, align:'left'},
            {field:'month1Money', title:'一月金额' , width:100, align:'left'},
            {field:'month2Money', title:'二月金额' , width:100, align:'left'},
            {field:'month3Money', title:'三月金额' , width:100, align:'left'},
            {field:'month4Money', title:'四月金额' , width:100, align:'left'},
            {field:'month5Money', title:'五月金额' , width:100, align:'left'},
            {field:'month6Money', title:'六月金额' , width:100, align:'left'}
        ]];
        
        
        $(function(){
                      
            
            $('#dtMain').datagrid({
toolbar:toolbarBtnList,
columns:columnList,
width:700,
height:"auto",
fit:true, 
singleSelect:true, 
fitColumns:false, 
nowrap:false, 
pagination:false
});

reloadRecord();
        });
        
        
      
        
        //刷新
        function reloadRecord()
        {
            //显示等待画面
            showLoading();
            
            var methodUrl = "WSBudgetTest.asmx/getSubjectBudgetList";


            
            ajaxRequest(methodUrl , '{"budgetConfigId":1,"budgetSubjectId":2}', function(data){
                //隐藏等待画面
                hideLoading();
                
                console.error($.parseJSON(data.d));
                
                //装载数据
                $("#dtMain").datagrid("loadData", $.parseJSON(data.d));
            });
            $("#dtMain").datagrid("clearSelections");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div region="center">
        <table id="dtMain"> </table>
    </div>
</asp:Content>
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值