jqGrid 是B/S架构,服务器端管理数据,客户端显示出来,jqGrid采用ajax来处理请求与响应。

jqGrid 是基于jQuery的一个表格控件。源码开放:jquery.jqGrid.src.js,有兴趣的大虾可以看看写法。

需要使用jqGrid时,引入以下文件即可:

js: jquery.js  jquery.jqGrid.min.js

css: ui.jqgrid.css

theme:主题可根据需要自定义,jquery-ui 的主题都是支持的

下面是摘自jqGrid Wiki 文档中关于jqGrid如何工作的部分:

Understanding how jqGrid works will help you get up to speed with the full capabilities of the plugin. The first thing to understand is that there are two aspects to working with tabular data:

  • Client-side representation, and
  • Server-side manipulation

JqGrid is a component that presents tabular data for easy manipulation in a web browser grid. jqGrid uses Ajax calls to retrieve information and construct the representation (tabular data) using the jqGrid Column Model (colModel).

Furthermore, jqGrid helps you send any data changes or additions to the database on the server-side, a process known as server-side manipulation, or SSM.

SSM means the server handles the actual changes to the database, and not the user's browser. SSM isn’t something that is visible within a web page. Server side data changes are done using PHP, or any other common programming language.

A jqGrid is comprised of the following four parts:

  • Caption layer
  • Header layer
  • Body layer
  • Navigation layer

Caption layer contains common information for the represented data.

Header layer contains information about the columns: labels, width, etc.

Body layer is the data requested from the server and displayed according to the settings in the column model.

Navigation layer contains additional information from the requested data and actions for requesting little pieces of information – in the literature called paging. Note that the navigation layer can be placed not only at bottom of the grid, but anywhere on the page. The Navigation layer is also the place for adding buttons or links for editing, deleting, adding to and searching your grid data.

The minimum for the representing the data are Header layer and Body layer.

To allow freedom and flexibility, and often a better impression, jqGrid relies on CSS (Cascading Style Sheets) to govern its appearance.

In more sophisticated case the grid can have more elements as shown below:

The grid can not only have additional layers, but also allow more than the rows to contain the main data. jqGrid support treegrid, subgrid and grouping of data.

If you choose, the grid can look like a table having some advance features like sorting, resizing of columns, reordering of columns with respect of drag&drop and so on, as shown below:

转载于:https://www.cnblogs.com/ydchw/archive/2013/04/15/3022260.html

jqGrid专题:jqGrid原理相关推荐

  1. 【JqGrid】JqGrid API 中文说明及用法

    JQGrid是一个在jquery基础上做的一个表格控件,以ajax的方式和服务器端通信. JQGrid Demo 是一个在线的演示项目.在这里,可以知道jqgrid可以做什么事情. 下面是转自其他人b ...

  2. Jqgrid入门-Jqgrid格式化数据(九)

    上一章已经说明了在Jqgrid中如何对数据分组,这一章主要探讨如何格式化Jqgrid中的数据.何谓格式化呢?举个例子,比如对时间格式化处理,去掉后面的时分秒:对数字进行处理,加上千分位分隔符,小数的保 ...

  3. 【JqGrid】JqGrid单元格合并及表头列合并,jqgrid单元格合并

    1.合并单元格代码示例 表头列合并代码: 效果图 2.jqgrid表头合并和行合并,基于jquery脚本插件 下面的js是近期写的一个jqgrid表头与行合并脚本.jqgrid也真是,表头合并的功能都 ...

  4. 【JqGrid】jqgrid合并单元格

    1.jqgrid官方的事件和方法 http://www.trirand.com/jqgridwik ... %5B%5D=gridcomplete http://www.trirand.com/jqg ...

  5. 【JqGrid】JqGrid本页合计+总合计(统计)

    今天做了个JqGrid本页合计+总合计(统计)的功能,有点吃力,所以在这里汇总纪录一下: 1.先看看效果,页面如下 2.要实现本页合计+总合计,首先需要添加如下代码: 代码如下: formatPers ...

  6. sql server 创建唯一性非聚集索引语句_数据库专题—索引原理

    深入浅出数据库索引原理 参见:https://www.cnblogs.com/aspwebchh/p/6652855.html 1.为什么给表加上主键? 1.平时创建表的时候,都会给表加上主键.如果没 ...

  7. 设备配网专题《原理分析,设备配网技术之AP配网》

    1.什么是AP配网?即是传统配网,是一种配网成功率很高的WiFi配网方式 AP配网原理:设备开启AP模式,手机用于STA模式,手机连接设备AP组成局域网,手机发送需要连接路由的SSID及PASSWD给 ...

  8. 设备配网专题《原理分析,设备配网技术之AirKiss微信配网》

    1 什么是AirKiss?技术 AirKiss是微信硬件平台提供的一种WIFI设备快速入网配置技术,要使用微信客户端的方式配置设备入网,需要设备支持AirKiss技术.目前已经有越来越多的芯片和模块厂 ...

  9. JQGrid 参数、属性API

    JQGrid是一个在jquery基础上做的一个表格控件,以ajax的方式和服务器端通信. JQGrid Demo 是一个在线的演示项目.在这里,可以知道jqgrid可以做什么事情. 下面是转自其他人b ...

最新文章

  1. Linux初级运维(七)——bash脚本编程(常见测试)
  2. laravel conf/app.php
  3. P1080 国王游戏(贪心)
  4. 避免资源放在收藏夹里面吃灰的方法(如从typora上直接能导出html并且无缝连接到微信公众号的神奇网站)
  5. Java 8:对集合中的值进行排序
  6. slot传函数 vue_面试必备 Vue 知识点
  7. 华为交换机屏蔽远程计算机,华为交换机远程telnet配置的小问题
  8. 第一个程序03 - 零基础入门学习汇编语言22
  9. linux mutex 数量上限,互斥量mutex
  10. 网站后台开发 java_Java前后台开发
  11. Visio 2016专业版 激活方式
  12. 自己研发的系统给rtx发消息
  13. FaceBook 遭遇有史以来全球最大宕机
  14. iOS 图片遮罩动画,图片逐渐显示
  15. Android Camera 实时滤镜(五)
  16. (3)Mathpix Snipping Tool——公式截图获取工具(转为LaTex、MarkDown格式)
  17. 个人记录 | 研二预答辩中的一些记录
  18. 腾讯开奖,薪资倒挂!
  19. java web 下拉列表_关于web中下拉列表的几种实现方法
  20. html 下拉图片列表,图片、表单、下拉选项

热门文章

  1. Android安全之应用签名验证
  2. XSS,CSRF防范 也是慢慢更
  3. Windows Mobile 模拟器网络连接设置
  4. python默认参数的传参方式_如何跳过在Python方法中提供默认参数
  5. 机器学习必读之路必读_2017年必读的9个游戏故事
  6. 软件构建设计图_游戏设计如何帮助您构建更好的软件
  7. RTFM? 如何写一本值得一读的手册
  8. (25)Vue.js组件通信—父组件向子组件传值
  9. node 连接mongodb
  10. Bootstrap 中的工具Mixin