# jsGrid Lightweight Grid jQuery Plugin
[![Build Status](https://travis-ci.org/tabalinas/jsgrid.svg?branch=master)](https://travis-ci.org/tabalinas/jsgrid)
Project site [js-grid.com](http://js-grid.com/)
**jsGrid** is a lightweight client-side data grid control based on jQuery.
It supports basic grid operations like inserting, filtering, editing, deleting, paging, sorting, and validating.
jsGrid is tunable and allows to customize appearance and components.
![jsGrid lightweight client-side data grid](http://content.screencast.com/users/tabalinas/folders/Jing/media/beada891-57fc-41f3-ad77-fbacecd01d15/00000002.png)
## Table of contents
* [Demos](#demos)
* [Installation](#installation)
* [Basic Usage](#basic-usage)
* [Configuration](#configuration)
* [Grid Fields](#grid-fields)
* [Methods](#methods)
* [Callbacks](#callbacks)
* [Grid Controller](#grid-controller)
* [Validation](#validation)
* [Localization](#localization)
* [Sorting Strategies](#sorting-strategies)
* [Load Strategies](#load-strategies)
* [Load Indication](#load-indication)
* [Requirement](#requirement)
* [Compatibility](#compatibility)
## Demos
See [Demos](http://js-grid.com/demos/) on project site.
Sample projects showing how to use jsGrid with the most popular backend technologies
* **PHP** - https://github.com/tabalinas/jsgrid-php
* **ASP.NET WebAPI** - https://github.com/tabalinas/jsgrid-webapi
* **Express (NodeJS)** - https://github.com/tabalinas/jsgrid-express
* **Ruby on Rail** - https://github.com/tabalinas/jsgrid-rails
* **Django (Python)** - https://github.com/tabalinas/jsgrid-django
## Installation
Install jsgrid with bower:
```bash
$ bower install js-grid --save
```
Find jsGrid cdn links [here](https://cdnjs.com/libraries/jsgrid).
## Basic Usage
Ensure that jQuery library of version 1.8.3 or later is included.
Include `jsgrid.min.js`, `jsgrid-theme.min.css`, and `jsgrid.min.css` files into the web page.
Create grid applying jQuery plugin `jsGrid` with grid config as follows:
```javascript
$("#jsGrid").jsGrid({
width: "100%",
height: "400px",
filtering: true,
editing: true,
sorting: true,
paging: true,
data: db.clients,
fields: [
{ name: "Name", type: "text", width: 150 },
{ name: "Age", type: "number", width: 50 },
{ name: "Address", type: "text", width: 200 },
{ name: "Country", type: "select", items: db.countries, valueField: "Id", textField: "Name" },
{ name: "Married", type: "checkbox", title: "Is Married", sorting: false },
{ type: "control" }
]
});
```
## Configuration
The config object may contain following options (default values are specified below):
```javascript
{
fields: [],
data: [],
autoload: false,
controller: {
loadData: $.noop,
insertItem: $.noop,
updateItem: $.noop,
deleteItem: $.noop
},
width: "auto",
height: "auto",
heading: true,
filtering: false,
inserting: false,
editing: false,
selecting: true,
sorting: false,
paging: false,
pageLoading: false,
rowClass: function(item, itemIndex) { ... },
rowClick: function(args) { ... },
rowDoubleClick: function(args) { ... },
noDataContent: "Not found",
confirmDeleting: true,
deleteConfirm: "Are you sure?",
pagerContainer: null,
pageIndex: 1,
pageSize: 20,
pageButtonCount: 15,
pagerFormat: "Pages: {first} {prev} {pages} {next} {last} {pageIndex} of {pageCount}",
pagePrevText: "Prev",
pageNextText: "Next",
pageFirstText: "First",
pageLastText: "Last",
pageNavigatorNextText: "...",
pageNavigatorPrevText: "...",
invalidNotify: function(args) { ... }
invalidMessage: "Invalid data entered!",
loadIndication: true,
loadIndicationDelay: 500,
loadMessage: "Please, wait...",
loadShading: true,
loadIndicator: function(config) { ... }
loadStrategy: function(config) { ... }
updateOnResize: true,
rowRenderer: null,
headerRowRenderer: null,
filterRowRenderer: null,
insertRowRenderer: null,
editRowRenderer: null,
pagerRenderer: null
}
```
### fields
An array of fields (columns) of the grid.
Each field has general options and specific options depending on field type.
General options peculiar to all field types:
```javascript
{
type: "",
name: "",
title: "",
align: "",
width: 100,
visible: true,
css: "",
headercss: "",
filtercss: "",
insertcss: "",
editcss: "",
filtering: true,
inserting: true,
editing: true,
sorting: true,
sorter: "string",
headerTemplate: function() { ... },
itemTemplate: function(value, item) { ... },
filterTemplate: function() { ... },
insertTemplate: function() { ... },
editTemplate: function(value, item) { ... },
filterValue: function() { ... },
insertValue: function() { ... },
editValue: function() { ... },
cellRenderer: null,
validate: null
}
```
- **type** is a string key of field (`"text"|"number"|"checkbox"|"select"|"textarea"|"control"`) in fields registry `jsGrid.fields` (the registry can be easily extended with custom field types).
- **name** is a property of data item associated with the column.
- **title** is a text to be displayed in the header of the column. If `title` is not specified, the `name` will be used instead.
- **align** is alignment of text in the cell. Accepts following values `"left"|"center"|"right"`.
- **width** is a width of the column.
- **visible** is a boolean specifying whether to show a column or not. (version added: 1.3)
- **css** is a string representing css classes to be attached to the table cell.
- **headercss** is a string representing css classes to be attached to the table header cell. If not specified, then **css** is attached instead.
- **filtercss** is a string representing css classes to be attached to the table filter row cell. If not specified, then **css** is attached instead.
- **insertcss** is a string representing css classes to be attached to the table insert row cell. If not specified, then **css** is attached instead.
- **editcss** is a string representing css classes to be attached to the table edit row cell. If not specified, then **css** is attached instead.
- **filtering** is a boolean specifying whether or not column has filtering (`filterTemplate()` is rendered and `filterValue()` is included in load filter object).
- **inserting** is a boolean specifying whether or not column has inserting (`insertTemplate()` is rendered and `insertValue()` is included in inserting item).
- **editing** is a boolean specifying whether or not column has editing (`editTemplate()` is rendered and `editValue()` is included in editing item).
- **sorting** is a boolean specifying whether or not column has sorting ability.
- **sorter** is a string or a function specifying how to sort item by the field. The string is a key of sorting strategy in the registry `jsGrid.sortStrategies` (the registry can be easily extended with custom sorting functions). Sorting function has the signature `function(value1, value2) { return -1|0|1; }`.
- **headerTemplate** is a function to create column header content. It should return markup as string, DomNode or jQueryElement.
- **itemTemplate** is a function to create cell content. It should return markup as string, DomNode or jQueryElement. The function signature is `function(value, item)`, where `value` is a value of column property of data item, and `item` is a row data item.
- **filterTemplate** is a function to create filter row cell content. It should return markup as string, DomNode or jQueryElement.
- **insertTemplate** is a function to create insert row cell content. It should return markup as string, DomNode or jQueryElement.
- **editTemplate** is a function to create cell content of editing row. It should return markup as string, DomNode or jQueryElement.
没有合适的资源?快使用搜索试试~ 我知道了~
MF00471-C#进销存云平台源码.zip
共2006个文件
js:1357个
css:223个
html:190个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 12 浏览量
2023-09-15
10:35:56
上传
评论
收藏 26.08MB ZIP 举报
温馨提示
C#进销存云平台源码 库存管理平台源码 开发语言 : C# 数据库 : MySQL 开发工具 : VS2017 源码类型 : WebForm 注意:不带技术支持,有帮助文件,虚拟商品,发货不退,看好再拍。 功能介绍 商品分类、商品信息、客户管理、供应商管理、入库单、出库单、库存查询、出入库查询 系统为云平台,注册后可进入 开发语言.net mvc 数据库mysql 开发工具:Visual Studio 2017 数据库:MySQL 8 数据库连接字符串配置:文件位置:ERP/Config/SqlMap.config 数据库备份文件:ERP.Common/data
资源推荐
资源详情
资源评论
收起资源包目录
MF00471-C#进销存云平台源码.zip (2006个子文件)
bootstrap.css 153KB
bootstrap.min.css 140KB
summernote-bs3.css 131KB
bootstrap.min.css 115KB
bootstrap.min.css 115KB
css-chart.css 38KB
jquery-ui.css 36KB
jquery-ui.min.css 31KB
jquery-ui.min.css 31KB
gridstack-extra.css 29KB
bootstrap-grid.css 28KB
gridstack-extra.min.css 25KB
fullcalendar.css 24KB
demo.css 24KB
bootstrap-table-group-by.css 24KB
sweetalert.css 22KB
jquery-ui-1.10.3.custom.css 21KB
bootstrap-grid.min.css 21KB
bootstrap-editable.css 21KB
bootstrap-editable.css 21KB
_all.css 20KB
bootstrap-social.css 20KB
jquery-ui-1.10.3.custom.min.css 19KB
jquery-ui.structure.css 18KB
jquery-ui.theme.css 18KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
select2.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.css 17KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
bootstrap-datepicker.min.css 15KB
jquery-ui.structure.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
jtable.min.css 15KB
fullcalendar.min.css 15KB
select2.min.css 15KB
site.css 14KB
_all.css 14KB
_all.css 14KB
summernote.css 14KB
jquery-ui.theme.min.css 14KB
dataTables.jqueryui.css 13KB
dropify.css 13KB
summernote.css 13KB
jtable_jqueryui.css 13KB
_all.css 12KB
magnific-popup.css 12KB
bootstrap-select.css 12KB
jtable_jqueryui.min.css 11KB
bootstrap-select.min.css 10KB
horizontal-timeline.css 10KB
gridstack.css 10KB
dropify.min.css 10KB
normalize.css 10KB
jtable_basic.css 9KB
gridstack.min.css 9KB
cropper.css 9KB
steps.css 8KB
cropper.min.css 8KB
cropper.min.css 8KB
normalize.css 8KB
jquery-clockpicker.css 8KB
magnific-popup.css 8KB
jtable_basic.min.css 7KB
dataTables.bootstrap.css 7KB
bootstrap-table.css 7KB
bootstrap-switch.css 7KB
prism.css 7KB
bootstrap-select.min.css 6KB
jquery-jvectormap-2.0.2.css 6KB
jquery-clockpicker.min.css 6KB
typehead-min.css 6KB
bootstrap-table.css 6KB
bootstrap-table.min.css 6KB
jquery.steps.css 6KB
bootstrap-switch.min.css 5KB
共 2006 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
jane9872
- 粉丝: 108
- 资源: 7795
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功