easy ui datagrid 数据绑定

时间:2022-11-29 19:40:52

easy ui datagrid 数据绑定

1.前台页面

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../../EasyUI/themes/default/easyui.css" rel="stylesheet" />
<link href="../../../EasyUI/demo/demo.css" rel="stylesheet" />
<link href="../../../EasyUI/themes/icon.css" rel="stylesheet" />
<script src="../../../EasyUI/jquery.min.js"></script>
<script src="../../../EasyUI/jquery.easyui.min.js"></script> <script>
$(document).ready(function () {
$('#list').datagrid({
title: '统计 报表',
iconCls: 'icon-save',
width: 800,
height: 250,
url: "datagrid.js",
method:'get',
columns: [[
{ title: '统计', colspan: 6 },
{
field: 'OID', title: '标题', width: 100, align: 'center', rowspan: 2, }
], [
{ field: 'oid', title: '订单ID', width: 100 },
{ field: 'Indate', title: '入住日期', width: 100, align: 'right' },
{ field: 'outdate', title: '离店日期', width: 100, align: 'left' },
{ field: 'roomnum', title: '房间数', width: 100 },
{ field: 'price', title: '价格', width: 100 },
{ field: 'pricecb', title: '成本价格', width: 100 }
]],
pagination: true,
rownumbers: true
});
}
);
</script>
</head>
<body>
<table id="list"></table>
</body>
</html>

2.data

{"total":100,"rows":[{"ID":"7","OID":"17","HotelID":"57","RoomTypeID":"216","SourceCID":"1","CID":"1","Indate":"2010-9-11 0:00:00","Price":"","THPrice":"","RoomNum":"1","PriceCB":"","PriceAC":"","HotelStatus":"0","SourceStatus":"0","CusPriceAC":"","RoomIn":"0","PrivataRoom":"0","CusPrice":"0","CUsID":"1","InStatus":"","OutStatus":"","InMoney":"","OutMoney":"","TableName":"T_OrderRoom"},{"ID":"202","OID":"67","HotelID":"57","RoomTypeID":"579","SourceCID":"1","CID":"1","Indate":"2010-10-7 0:00:00","Price":"825","THPrice":"660","RoomNum":"1","PriceCB":"700","PriceAC":"660","HotelStatus":"0","SourceStatus":"0","CusPriceAC":"","RoomIn":"0","PrivataRoom":"0","CusPrice":"0","CUsID":"1","InStatus":"","OutStatus":"","InMoney":"","OutMoney":"","TableName":"T_OrderRoom"}]}

3.说明

 method:'get', 在请求时需要

easy ui datagrid 数据绑定的更多相关文章

  1. JQuery Easy Ui dataGrid 数据表格 ---制作查询下拉菜单

    JQuery Easy Ui dataGrid 数据表格 数据表格 - DataGrid 继承$.fn.panel.defaults,使用$.fn.datagrid.defaults重载默认值.. 数 ...

  2. Jquery Easy UI Datagrid 上下移动批量保存数据

    DataGrid with 上下移动批量保存数据 通过前端变量保存修改数据集合,一次性提交后台执行 本想结合easyui 自带的$('#dg').datagrid('getChanges'); 方法来 ...

  3. easy ui datagrid 增,删,改,查等基本操作

    如下图: ①列表信息图 ②添加信息图 ③修改信息图 html代码: <%@ Page Title="" Language="C#" MasterPageF ...

  4. jquery Easy UI Datagrid&lpar;数据网格&rpar;学习心德,附API

    第一步,引入主要的css样式和js文件 <meta http-equiv="Content-Type" content="text/html; charset=ut ...

  5. Jquery easy ui datagrid動態加載列問題

    1.如下图效果是当选择不同的日期范围时datagrid则会加载出对应的列数

  6. jquery easy ui datagrid中遇到的坑爹的問題。。。

    ; //修改 function Update() { //獲取選中行 var selected = $("#dg1").datagrid('getSelected'); //判斷是 ...

  7. JQuery Easy Ui DataGrid

    Extend from $.fn.panel.defaults. Override defaults with $.fn.datagrid.defaults. The datagrid display ...

  8. JQuery Easy Ui dataGrid 数据表格

    数据表格 - DataGrid 英文文档:http://www.jeasyui.com/documentation/index.php# 继承$.fn.panel.defaults,使用$.fn.da ...

  9. easy ui datagrid 获取选中行的数据

    取得选中行数据: var row = $('#tt').datagrid('getSelected'); if (row){ alert('Item ID:'+row.itemid+" Pr ...

随机推荐

  1. React Native Android gradle下载慢问题解决

    很多人会遇到 初次运行 react-native run android的时候 gradle下载极慢,甚至会失败的问题 如下图 实际上这个问题好解决的 首先 把对应版本的gradle下载到本地任意一个 ...

  2. h264 profile &amp&semi; level

    转自:http://blog.csdn.net/sphone89/article/details/17492433 H.264 Profiles H.264有四种profile,每个profile支持 ...

  3. iOS开发中的错误整理,通过storyboard做项目,遇到view看不见,或者view被压缩的情况

    前言:在网易新闻的练习中遇到了这个错误 注意:练习中遇到了如图的bug,主要是因为用storyboard布局 600 * 600   显示的时候要经过自动布局,缩小到相应手机的屏幕大小.也就是有的尺寸 ...

  4. Codeforces Round &num;138 &lpar;Div&period; 2&rpar;

    A. Parallelepiped 枚举其中一边,计算其他两条边. B. Array 模拟. C. Bracket Sequence 栈. D. Two Strings \(pre[i]\)表示第i个 ...

  5. Oracle函数整理

    ) from dual;--绝对值 ,) from dual;--取模,取余数 select ceil (12.1) from dual;--去上限值 select floor (12.1) from ...

  6. Office Add-in 架构和入门

    作者:陈希章 发表于2017年7月12日 前言 从2月26日开始写这个Office 365开发概览系列文章-- https://aka.ms/office365devguide,到现在已经有17篇文章 ...

  7. 对MBProgressHUD第三方进行源码分析

    GitHub源码地址,及时更新:iOS-Source-Code-Analyze MBProgressHUD是一个为iOS app添加透明浮层 HUD 的第三方框架.作为一个 UI 层面的框架,它的实现 ...

  8. Step by Step Recipe for Securing Kafka with Kerberos

    Short Description: Step by Step Recipe for Securing Kafka with Kerberos. Article I found it is a lit ...

  9. WEB前端基础知识点

    因为要告知浏览器的解析器用什么文档标准解析这个文档,所以在文档的开头要写上文档类型声明,H5的文档类型声明要比H4文档类型声明简洁的多.因为H5不基于SGML(标准通用标记语言),所以不需要对DTD文 ...

  10. C&num; 数据推送 实时数据推送 轻量级消息订阅发布 多级消息推送 分布式推送

    前言 本文将使用一个NuGet公开的组件技术来实现数据订阅推送功能,由服务器进行推送数据,客户端订阅指定的数据后,即可以接收服务器推送过来的数据,包含了自动重连功能,使用非常方便 nuget地址:ht ...