Sigma Grid 研究及使用

Sigma Grid 纯javascript,Sigma grid 用Ajax做grid展现并可实现数据的编辑,支持滚动表格及排序。它是非常强大的并且简单易用并且能整合php,asp.net,jsp,RoR

研究版本:Sigma Grid 2.2

Grid目录结构:
grid
|--->calendar
| |--calendar.js
| |--calendar-blue.css
| |--calendar-cn.js
| |--calendar-cn-utf8.js
| |--calendar-en.js
| |--calendar-setup.js
| |--simple-1.html
|--> flashchart
| |---->fusioncharts
| | |--->charts
| | | |--FCF_Area2D.swf
| | | |--略……(.swf)
| | |--ChangeDataXML.html
| | |--Chart.html
| | |--ChartChange.html
| | |--FusionCharts.js
|--->skin
| |---->china
| | |--->images
| | | |--cell_index_bg.gif
| | | |--略……(.gif)
| | |--skinstyle.css
| |---->default
| | |--->images
| | | |--button_bg.gif
| | | |-- 略……(.gif)
| | |--skinstyle.css
| |---->mac
| | |--->images
| | | |--button_bg.gif
| | | |-- 略……(.gif)
| | |--skinstyle.css
| |---->vista
| | |--->images
| | | |--cell_index_bg.gif
| | | |-- 略……(.gif)
| | |--skinstyle.css
|--gt_grid_all.js
|--gt_grid_height.css
|--gt_grid.css
|--gt_msg_en.js


Sigma Grid 2.2特征:
[color=orange]CSS based themes [/color]
Sigma grid appearance is controled via a stand-alone CSS(style sheet). Developer can change grid skin by defining themes in different CSS files. Classic, Vista, Mac, XP Style built in 2.0.

[color=orange]Event handlers & user API [/color]
Plentiful attibutes and event handlers give you more flexibility without coding too much.

[color=orange]Inline cell editing [/color]
Inline cell editing just as you would in MS Excel. Navigate with the tab or enter key to move between cells . End user also can remove / add / append rows. Dropdownlist, calendar, text editor built in 2.0.

[color=orange]Linkable grids[/color]
Allow you to create multiple grid instances on one web page. With events and JavaScript API, Developers can implement one-to-many or many-to-many relationships (master-detail) at ease.

[color=orange]Lockable header and column [/color]
This feature enable you to keep some columns and/or header always visible in spite of user scrolling grid. Similar to the window freeze panes option in MS Excel.

[color=orange]Math formulas for cells [/color]
Developer can specify some cells to be a formula instead of a value. What is more, whether a cell is editable could depend on a boolean formula.

[color=orange]Flexible headers [/color]
One of the new features is the ability to enable developer to work out as complex header as they wish. Nested header, image header, dropdown list control embeded header are all supported.

[color=orange]Online one-key printing [/color]
Online printing, to make it easy to print tabular data in WYSIWYG way. Built in button, no coding.

[color=orange]Pure javascript codes [/color]
Seamless Integration with any server side solution, such as j2ee, .net, PHP, perl. v Cross browers

[color=orange]More browser supported[/color]
IE 6.0+ \ FireFox 2.0+ \ Safari 3.0+ \ Opera9.0+ supported.

[color=orange]Paging[/color]
This feature enable developer display data page by page. Data will not be retrieved from server side until end user come to the page it is at. Developer can control how many rows are displayed at one time.

[color=orange]Resizable Columns [/color]
Columns width could be changed by end user draging columns header.

[color=orange]Single selection & multi selection[/color]
Sigma grid has the ability to select non-contiguous rows. This allows for more robust manipulation of records in the Grid.

[color=orange]Slice rendering[/color]
You may load thousands rows of data into grid in one time.Slice rendering could help you increase user experience. When this mode activated, everytime the vertical scroll bar is dragged, SigmaGrid will detemine which rows are visible and paint them out.

[color=orange]Sorting & various data types [/color]
End user can sort records by clicking on the header of a column. Developer can specify sorting way for various types including string,number,boolean,link,select and percent. Developer may define a new data type and a new way to sort.

[color=orange]User defined editor & renderer [/color]
Extensibility enable you to replace built-in cell editor with custom external component, present cell data as your customers' wish.

[color=orange]Various load sources[/color]
Developers can export data to / load data from variouse sources, including in JSON, XML, CSV (Comma Separated Values) format, to support further editing within spreadsheet or any other applications.

[color=orange]Flash chart built[/color]
Bar diagram, line diagram and pie diagram built in. Translation tabular data into diagram without any server-side coding.

[color=orange]Data filter[/color]
Data filter enables sigma grid to present the data users are interested in only.

[size=large][b]这里以master/details和Sigma Grid CRUD为例,说明Sigma Grid的使用方法,各个参数的作用,数据的传输,及数据的保存[/b]。[/size]

master/details的demo演示页面为example_master_details.html
此demo演示了父子关系的grid。子grid为明细信息,通过鼠标点击父grid的某条记录关联出子grid内容。
下面着重介绍此grid的使用方法:
首先在页面中定义两个grid的位置

<div id="bigbox" style="margin:15px;display:!none;">
<div id="gridbox" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:200px;width:700px;" ></div>
</div>
<div id="bigboxDetails" style="margin:15px;display:!none;">
<div id="gridboxDetails" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:250px;width:700px;" ></div>
</div>


自定义grid列头
<table id="myHead" style="display:none">
<tr>
<td rowspan="2" columnId='chk' resizable='false'>
<input id="g1_chk" type="checkbox"/></td>
<td rowspan="2" columnId='no' resizable='false'>Order No</td>
<td rowspan="2" columnId='employee' resizable='false'>Employee</td>
<td colspan="7">Order Info</td>
</tr>
<tr>
<td columnId='country'>Country</td>
<td columnId='customer'>Customer<img src="./images/customer.gif"/></td>
<td columnId='bill2005'>2005</td>
<td columnId='bill2006'>2006</td>
<td columnId='bill2007'>2007</td>
<td columnId='bill2008'>2008</td>
<td columnId='orderDate'>Ship Date</td>
</tr>
</table>

//定义两个grid
var grid_demo_id = "myGrid1" ;
var grid_details_id = "myGrid2";

[b]构建父grid数据结构[/b]
var dsOption= {

fields :[
{name : 'no' },
{name : 'country' },
{name : 'customer' },
{name : 'employee' },
{name : 'bill2005' ,type: 'float' },
{name : 'bill2006' ,type: 'float' },
{name : 'bill2007' ,type: 'float' },
{name : 'bill2008' ,type: 'float' },
{name : 'orderDate' ,type:'date' }

],
uniqueField : 0 , //It could be unique field name or unique field index in fields
recordType : 'object' //记录类型只能是:'object' or 'array'
}


[b]构建子grid数据结构[/b]

var dsOptionDetails= {

fields :[
{name : 'no' },
{name : 'product' },
{name : 'unitPrice' ,type:'float' },
{name : 'quantity' ,type: 'int' },
{name : 'discount' ,type: 'float' },
{name : 'taxFree' ,type: 'int' },
{name : 'taxRate' ,type: 'float' },

{name : 'shipTo', type: 'int'},
{name : 'shipment'},
{name : 'note'},

{name : 'tax',type: 'float' , initValue : function(record){
var avg = record[5]*record[6];
return avg.toFixed(2);
}},
{name : 'totalPrice' ,type: 'float' , initValue : function(record){
var avg = record[2]*record[3]*record[4]*record[5]*record[6];
return avg.toFixed(2);
}}
],

recordType : 'array'
}
//渲染成checked.gif
function example_renderTaxFree(value ,record,columnObj,grid,colNo,rowNo){
if(value==0) return "<img src='./images/unchecked.gif'>";
return "<img src='./images/checked.gif'>";

}


//渲染成星星 five_star
function example_renderDiscount(value ,record,columnObj,grid,colNo,rowNo){
var i = Math.round(value / 0.4 * 5);
if(i>5)i=5;if(i<1)i=1;
return "<IMG SRC=\"./images/five_star" + i + ".gif\" />"


}


构建父grid 列样式
[color=red]/*
isCheckColumn:选项列
filterable:是否可以过滤此列
exportable:输出表格
id:id
header:显示的名称
width:宽度
inChart:是否在图表中统计
chartColor:图表颜色
*/[/color]
var colsOption = [
{id: 'chk' ,isCheckColumn : true, filterable: false, exportable:false},
{id: 'no' , header: "Order No" , width :60 },
{id: 'employee' , header: "Employee" , width :80 },
{id: 'country' , header: "Country" , width :70 },
{id: 'customer' , header: "Customer" , width :80 },
{id: 'bill2005' , header: "2005" , width :60, inChart :true, chartColor : 'eecc99'},
{id: 'bill2006' , header: "2006" , width :60, inChart :true, chartColor : '66eeaa' },
{id: 'bill2007' , header: "2007" , width :60, inChart :true, chartColor : 'd65555' },
{id: 'bill2008' , header: "2008" , width :60, inChart :true, chartColor : 'eeaa33' },
{id: 'orderDate' , header: "Delivery Date" , width :100}

];

[b]构建子grid 列样式[/b]
[color=red]/*

editor:可以编辑此列 {type:类型
options:为下拉列表提供数据
defaultText:默认值
validRule:验证'R' - Required
'N' - Number
'E' - Email
'F' - Float}
frozen:是否锁定此列 如果被锁定 在拖动滚动条时候此列不会发生变化
sortOrder:排序 asc 或 desc
renderer:渲染效果 参数为function(value ,record,colObj,grid,colNo,rowNo)
align:位置

*/[/color]

var colsOptionDetails = [
{id: 'no' , header: "Item No" , width :60 , editor:{type:"text"},
frozen : true},
{id: 'product' , header: "Product" , width :100,
grouped : true , frozen : true , sortOrder : 'asc',
editor : { type :"select" ,
options : {"Abalone":"Abalone","Amber":"Amber","Amethyst":"Amethyst","Aquamarine":"Aquamarine",
"Cameos":"Cameos","Citrine":"Citrine","Coral":"Coral","Crystal":"Crystal","Cubic Zirconia":"Cubic Zirconia",
"Emerald":"Emerald","Enamel":"Enamel","Garnet":"Garnet","Glass":"Glass","Moissanite":"Moissanite",
"Onyx":"Onyx","Opal":"Opal","Pearl":"Pearl"} ,defaultText : '' }},
{id: 'unitPrice' , header: "Unit Price" , width :60 ,
editor: { type :"text" ,validRule : ['R','F'] } },
{id: 'quantity' , header: "Quantity" , width :80,
editor: { type :"text" ,validRule : ['R'] } },
{id: 'discount' , header: "Discount" , width :100 ,renderer : example_renderDiscount,
editor: { type :"text" ,validRule : ['R','F'] } },

{id: 'taxFree' , header: "Tax Free" , width :60 ,renderer : example_renderTaxFree },
{id: 'taxRate' , header: "Tax Rate" , width :60 ,
editor: { type :"text" ,validRule : ['R','F'] } },
{id: 'tax' , header: "Tax" , width :60},
{id: 'totalPrice' , header: "Total Price" , width :60, align:"right"
},
{id: 'shipTo' , header: "Ship To" , width :100 },
{id: 'shipment' , header: "Shipment" , width :100 },
{id: 'note' , header: "Note" , width :150 }

];


[b]父grid属性[/b]
[color=red]/*
width:宽度
height:高度
container:grid创建的位置
dataset:数据
columns:列样式
pageSizeList:页面显示条数
customHead:自定义grid头
onClickCell:点击触发事件
SigmaGridPath:未知
loadURL:获取数据地址
exportURL:输出地址 用于输出EXCEL XML CSV PDF
exportFileName:输出名称
remotePaging:指定服务器端不分页工作
defaultRecord:当点击添加按钮时默认的加入一行的数据
pageSize:页面显示记录数
toolbarContent:grid 工具条{
nav goto - 分页
pagesize - 显示记录数
reload - 刷新
print - 打印
csv - 输出CSV格式文件
xls - 输出xls格式文件
pdf - 输出pdf格式文件
filter - 过滤查询
chart - 图表
state - 状态
}
*/[/color]
var gridOption={
id : grid_demo_id,
width: "700",
height: "350",
container : 'gridbox',
replaceContainer : true,
dataset : dsOption ,
columns : colsOption ,
pageSizeList : [5,10,15,20],
customHead : 'myHead',
onClickCell : function(value, record , cell, row, colNO, rowNO,columnObj,grid){
var no = record["no"]>"070-19"?"070-19":record["no"];
var grid=Sigma.$grid(grid_details_id);
grid.loadURL = "./data/" + no + ".js";
grid.reload();
},
SigmaGridPath : '../grid/',
loadURL : 'test.jsp?actionMethod=list',
saveURL : 'test.jsp?actionMethod=save' ,
exportURL : './export_php/testMasterList.php?export=true',
exportFileName : 'Sales Master Report',
remotePaging : false,
defaultRecord : ["","","","",0,0,0,0,"2008-01-01"],
pageSize:20,
toolbarContent : 'nav goto | pagesize | reload | print csv xls xml pdf filter chart | state'
};


[b]子grid属性[/b]
[color=red]/*
editable:表格是否可编辑
groupable:true分组菜单将会出现在主菜单中,并且启动分组功能
clickStartEdit:点击鼠标出发编辑事件
showGridMenu:是否显示主菜单
allowCustomSkin:是否制定skin出现在菜单上
allowFreeze:是否被冻结栏出现在主菜单
allowHide:隐藏是否出现在主菜单
allowGroup:组是否出现在主菜单

*/[/color]

var gridOptionDetails={
id : grid_details_id,
loadUrl : './data/010-0.js',
saveURL : 'test.jsp?actionMethod=save' ,
width: "700",
height: "260",
container : 'gridboxDetails',
replaceContainer : true,
editable : true,
groupable : true,
pageSizeList : [5,10,15,20],
dataset : dsOptionDetails ,
columns : colsOptionDetails ,
clickStartEdit : true ,
defaultRecord : ["","",0,0,0.0,0,0.0,"Customer","UPS",""],
pageSize:30,
toolbarContent : 'reload | add del save | print | state',
showGridMenu : true,
allowCustomSkin : true ,
allowFreeze : true ,
allowHide : true ,
allowGroup : true,
customRowAttribute : function(record,rn,grid){
if (record[11]>80){
return 'style="height:50px; background-color:#ffddcc"';
}
}
};

创建Grid对象并输出
var mygrid=new Sigma.Grid( gridOption );
var mygridDetails = new Sigma.Grid(gridOptionDetails);

Sigma.Util.onLoad( Sigma.Grid.render(mygrid) );
Sigma.Util.onLoad( Sigma.Grid.render(mygridDetails) );


Sigma Grid CRUD的demo演示页面为list1.jsp
此例子用来说明 前后台的数据交互 及grid的增删改查及保存功能

获取数据属性:
loadURL
保存数据属性:
saveURL

例:
loadURL : APP_PATH+'/views/controller.jsp?actionMethod=list'
saveURL : APP_PATH+'/views/controller.jsp?actionMethod=save'

这里为了实现功能效果只简单的使用jsp直接访问数据库实现查询CRUD的工作。
当然也使用MVC结构来实现,只要返回的数据类型是JOSN并且符合Sigma Grid的数据格式即可
[b]controller.jsp[/b]
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.sql.*,java.util.*"%>
<%@ page import="com.fins.gt.server.*"%>
<%!
Connection getConnection(){

String url="jdbc:mysql://localhost:3306/sigma_grid_server";
Connection conn= null;
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(url,"root","");
}catch(Exception e){

}
return conn;
}

void closeConnection(Connection conn){
try{
conn.close();
}catch(Exception e){

}
}


List listOrders(){
Connection conn = getConnection();
if(conn==null)
return new ArrayList();
Statement stmt = null;

ResultSet rs = null;
List list = new ArrayList();

try{
stmt = conn.createStatement();
rs = stmt.executeQuery("select * from orders");
while(rs.next()){
Map map = new HashMap();
map.put("order_no",new Long(rs.getLong("order_no")));
map.put("employee",rs.getString("employee"));
map.put("country",rs.getString("country"));
map.put("customer",rs.getString("customer"));
map.put("order2005",new Float(rs.getFloat("order2005")));
map.put("order2006",new Float(rs.getFloat("order2006")));
map.put("order2007",new Float(rs.getFloat("order2007")));
map.put("order2008",new Float(rs.getFloat("order2008")));
map.put("delivery_date",rs.getString("delivery_date"));
list.add(map);
}
rs.close();
stmt.close();
}catch(Exception e){
}
closeConnection(conn);
return list;
}

int[] insertOrders( List updatedList){

int[] opresults=null;
String sql="INSERT INTO orders (employee,country,customer,order2005,order2006,order2007,order2008,delivery_date) VALUES (?,?,?,?,?,?,?,?)";
Connection conn=null;
PreparedStatement pstmt = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql);
for (int i=0;i<updatedList.size();i++){
Map record= (Map)updatedList.get(i);
pstmt.setString(1,String.valueOf(record.get("employee")));
pstmt.setString(2,String.valueOf(record.get("country")));
pstmt.setString(3,String.valueOf(record.get("customer")));
pstmt.setString(4,String.valueOf(record.get("order2005")));
pstmt.setString(5,String.valueOf(record.get("order2006")));
pstmt.setString(6,String.valueOf(record.get("order2007")));
pstmt.setString(7,String.valueOf(record.get("order2008")));
pstmt.setString(8,String.valueOf(record.get("delivery_date")));
pstmt.addBatch();
}
opresults = pstmt.executeBatch();
} catch (SQLException e) {
opresults=null;
}finally{
closeConnection(conn);
}
return opresults;
}

int[] updateOrders( List updatedList){

int[] opresults=null;
String sql="UPDATE orders SET customer=?, order2008=?, delivery_date=? WHERE order_no= ? ";
Connection conn=null;
PreparedStatement pstmt = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql);
for (int i=0;i<updatedList.size();i++){
Map record= (Map)updatedList.get(i);
pstmt.setString(1,String.valueOf(record.get("customer")));
pstmt.setString(2,String.valueOf(record.get("order2008")));
pstmt.setString(3,String.valueOf(record.get("delivery_date")));
pstmt.setString(4,String.valueOf(record.get("order_no")));
pstmt.addBatch();
}
opresults = pstmt.executeBatch();
} catch (SQLException e) {
opresults=null;
}finally{
closeConnection(conn);
}
return opresults;
}


int[] deleteOrders( List updatedList){

int[] opresults=null;
String sql="DELETE FROM orders WHERE order_no= ? ";
Connection conn=null;
PreparedStatement pstmt = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql);
for (int i=0;i<updatedList.size();i++){
Map record= (Map)updatedList.get(i);
pstmt.setString(1,String.valueOf(record.get("order_no")));
pstmt.addBatch();
}
opresults = pstmt.executeBatch();
} catch (SQLException e) {
opresults=null;
}finally{
closeConnection(conn);
}
return opresults;
}

boolean saveOrders(List insertedRecords , List updatedList, List deletedRecords){
//you can control transaction, commit, rollback here
int[] insertCodes = insertOrders(insertedRecords);
int[] updateCodes = updateOrders(updatedList);
int[] deleteCodes = deleteOrders(deletedRecords);
boolean success=insertCodes!=null && updateCodes!=null && deleteCodes!=null;
return success;
}

%>
<%

// GridServerHandler is server side wrapper, you can get all the info posted to server in your Java way instead of JavaScript
GridServerHandler gridServerHandler=new GridServerHandler(request,response);

String operation = request.getParameter("actionMethod");
if("save".equals(operation)){
System.out.println("----save-----");
boolean success=true;

//取得新增的数据集合, 每条数据记录在 map 里
List insertedRecords = gridServerHandler.getInsertedRecords();
//取得修改的数据集合, 每条数据记录在 map 里
List updatedList = gridServerHandler.getUpdatedRecords();
//取得删除的数据集合, 每条数据记录在 map 里
List deletedRecords = gridServerHandler.getDeletedRecords();


// 如果希望取得bean的集合 那么请使用有参方法: xxx.getXXXXXXRecords(Class beanClass);
//例如: List updateList = gridServerHandler.getUpdatedRecords(StudentVO.class);

//调用"相应的方法" 来update delete insert数据
success = saveOrders(insertedRecords , updatedList, deletedRecords );


//设置该次操作是否成功.
gridServerHandler.setSuccess(success);

//如果操作不成功 你也可以自定义一些异常信息发送给客户端.
// gridServerHandler.setSuccess(false);
// gridServerHandler.setException("... exception info ...");

//向客户端输出json字符串.
out.print(gridServerHandler.getSaveResponseText());

}else { //client is retrieving data
List list = listOrders();
System.out.println("----list-----");

int totalRowNum= list.size();
// 取得总记录数
gridServerHandler.setTotalRowNum(totalRowNum);

//调用"相应的方法" 来取得数据.下面4个方法 通常对于进行分页查询很有帮助,根据需要使用即可.
// gridServerHandler.getStartRowNum() 当前页起始行号
// gridServerHandler.getEndRowNum() 当前页结束行号
// gridServerHandler.getPageSize() 每页大小
// gridServerHandler.getTotalRowNum() 记录总条数


// 本例中list里的元素是 map,
// 如果元素是bean, 请使用 gridServerHelp.setData(list,BeanClass.class);
gridServerHandler.setData(list);
// gridServerHandler.setException("your exception message");

//向客户端输出json字符串.
out.print(gridServerHandler.getLoadResponseText());
System.out.print(gridServerHandler.getLoadResponseText());
// 你也可以 使用 gridServerHandler.getLoadResponseText() 来取得字符串.
// 然后自行向 客户端输出, 这样做的好处是 你可以自己来决定response的contentType和编码.


}
%>


通过上面的代码可以看出 操作grid的对象是GridServerHandler
使用GridServerHandler对象,来操作grid中的数据。

[color=blue]上传了demo,部署后访问demo地址为:
http://localhost:8080/GtGridDemo/views/demo1.jsp
.................................................................demo2.html
.................................................................demo3.jsp
.................................................................demo4.html
.................................................................demo5.html
通过以上demo实现以下功能
简单载入一个结果集(select top 20 * from Orders),主要展示以下特点(如何load数据,如何锁定表头列头,跨列表头如何设定,如何设定客户端按列排序)
带2个条件查询Orders表(如何传入查询条件查询),
主从表的载入(orders, Order Details)
可以的编辑单表Grid(单元格的编辑框如何定义,如何add和delete一行,编辑后的数据如何提交给jsp)
可以的编辑主从表Grid(重点体现子表如何编辑,并保持主记录和子记录的关系,编辑后的数据如何提交给jsp)
打印功能的实现(pdf,excel,)[/color]
sigma_grid api使用手册 教程示例 sigma_grid/gt_grid的最新使用手册/API/文档,其中包括示例/demos,可以参照学习。 立即下载

相关推荐

Sigma Grid

Sigma Grid是一个采用纯javascript开发的Ajax数据表格。特性包括: 1.基于CSS控制外观,内置Classic、Vista、Mac、XP四种风格。(可以自己改变风格哦) 2.提供单元格直接编辑功能,可以自定义编辑器,为单元格设置数学计算公式,自定义单元格表现方式。 3.提供灵活的表头控制功能比如:锁定表头,排序,拖动调整列宽。 4.支持分页,数据过滤,根据数据生成柱状图,饼状图,曲线图。 5.支持从多种数据源加载数据: JSON、XML、CSV等。(还包括js数组) 6.支持多种浏览器:IE6.0+\FireFox2.0+\Safari3.0+\Opera9.0+。 7.支持Excel,pdf,xml等导出方式。可自定义按钮功能。 我的博客上有示例(虽然写得很烂,嘿嘿,凑和看嘛): http://hi.baidu.com/jiaju1213/blog/item/19c424007e23a60e1d9583f7.html

Sigma-Grid.zip_grid_grid jquery_html jquery_jquery grid

Sigma Grid,jquery插件使用及说明文档

sigma_grid2.4

Sigma grid 最终版本,由纯javascript写成,是一个开源的AJAX数据网格,能滚动和排序显示和内嵌数据编辑功能,是非常强大且易于使用的表格,支持java,asp.net,jsp

Sigma Grid 2.4 探究 1

Sigma Grid 简介 Sigma Grid 是纯javascript实现的网页grid,支持数据修改,排序,分页,滚动,显示chart等等,功能比较全面,且易于与其他网页language整合。 研究版本:Sigma Grid 2.4 Grid目录结构: grid |--->calendar | |--calendar.js |...

weixin_34320724的博客 218

SigmaGrid控件】使用 demo

SigmaGrid是一款表格控件,但是第一次接触它的人可能觉得很难使用,确实如此,原因在于,我们之前使用的表格控件其实只是一种样式罢了,并非是一款真正意义上的控件,比如bootstrap,它仅仅是对table tr td这些标签添加了一些样式,然后前台用c:foreach之类的循环标签输出这些tr td。分页之类的前台逻辑我们必须自己手动完成,比如“下一页”标签,bootstrap提供给我们的可能

u010900754的专栏 6952

js表格控件: Sigma Grid

//Sigma var mygrid=new Sigma.Grid( gridOption ); Sigma.Util.onLoad( Sigma.Grid.render(mygrid) ); Sigma Grid是一个采用纯javascript开发的Ajax数据表格。特性包括: 1.基于CSS控制外观,内置Classic、Vista、Mac、XP四种风格。 2.提供

徐行 4908

Sigma Grid 表格的研究使用

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34315189的博客 418

Sigma Grid表格控件使用教程及下载

Sigma Grid最好用的表格控件 Sigma Grid 是一个基于 Ajax 的数据表格,用以显示滚动的表格以及进行单元格数据的在线编辑,支持各种流行的浏览器,提供服务器端的集成解决方案,包括 PHP、Java、.NET 和 Perl。主要功能包括数据浏览、嵌套的多个表头、列排序、分页显示,支持大数据量的数据显示。 Sigma Grid特性 Sigma Grid是一个采用纯javascr

控件选型需谨慎 2452

Sigma-Grid 2.4 afterEdit 事件 实现动态修改表格数据

需求: 在Sigma-Grid 2.4创建的table表格中实现点击下拉框选择 ,根据选择填充选中的这一条数据中某个特定表格中的汉字 版本: Sigma-Grid 2.4 过程: 在创建表格的加载对象中,添加 afterEdit方法 进行修改后的方法回调完成相对应的数据修改 var gridOption_ops...

Attacked_code的博客 518

Sigma Grid特性

Sigma Grid 是一个基于 Ajax 的数据表格,用以显示滚动的表格以及进行单元格数据的在线编辑,支持各种流行的浏览器,提供服务器端的集成解决方案,包括 PHP、Java、.NET 和 Perl。主要功能包括数据浏览、嵌套的多个表头、列排序、分页显示,支持大数据量的数据显示。 Sigma Grid特性 试用版下载 Sigma Grid是一个采用纯javascript开

1075

Sigma-grid分页的后台方法

  1.客户端sigma-grid的loadURL:../../service?action=BaseQuery因为是示例,所以在SQL语句直接写在sigma-gridgridOption中: beforeLoad : function(reqParam , grid ) { reqParam.parameters={"LoadSQL":"select id,name,refid1 f...

iteye_6328的博客 175

.net下导出sigma_grid数据到Excel

今天在做sigma_grid导出Excel数据,网上的Demo都是给一个导出Excel的地址,如: exportURL : './export_php/testList.php?export=true', 但是并没有给出服务端是如何处理的,只好猜想怎么做,传统的Excel导出方法无外乎就 那么几种方式,于是对着照写: 将导出Excel路径设置为:exportURL: '../Ajax/getTa

十年之约 748

sigma grid bug

发现sigma grid 一个小小的bug.grid 显示数据时,如果只有一条数据记录,    toolbarContent : 'state', 显示为NO  Data    

iteye_20049的博客 90

flexigridsigmagrid、datatables使用

  最近把datatables熟悉了下,做了个小的demo,后来想下,以后要是用到类似的grid的时候,为什么不做个集合了,so就有了这个东西了。   项目采用的是spring3mvc+mybatis,应该还比较好用。   引入的js插件有:   lhgdialog 弹出窗口组件 日期插件 jQuery formValidator   数据库脚本在webapp/re...

matychen 257

grid布局

grid布局

qq_42880714的博客 4016
上一篇: jquery autocomplete 扩充
下一篇: hibernate的各种保存方式的区别 (save,persist,update,saveOrUpdte,merge,flush,lock)
karlhell
博客等级 码龄19年 0粉丝 18原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值