没有合适的资源?快使用搜索试试~ 我知道了~
SlickGrid-api.docx
5星 · 超过95%的资源 需积分: 10 116 下载量 192 浏览量
2013-12-21
21:43:48
上传
评论 3
收藏 123KB DOCX 举报
温馨提示
试读
51页
SlickGrid-api.docx
资源推荐
资源详情
资源评论
API Reference
Navigation
Resources
API Reference
Grid
Grid Options
Column Options
Grid Events
DataView
Examples
Providing data to the grid
Plugins & Third-party packages
Learning
Getting Started
Handling Selection
Data-Driven Grid Customization
Writing Custom Cell Editors
Tests
Unit Tests
Contact/Support
Ask for Help
Report a Bug
SlickGrid on Twitter
Wiki▸API Reference
This is the API reference for SlickGrid.
Slick.Grid
Constructor - Slick.Grid constructor
Core - Core grid functionality
Columns - Initializing and customizing columns
Cells - Manipulating cell data and styling
Rendering - Rendering methods
Headers - Column header methods
DataView
Slick.Data.RemoteModel
Slick.Event
Slick.EventData
Slick.EditorLock
Slick.GlobalEditorLock
Slick.Range
Slick.CellRangeDecorator
Slick.CellRangeSelector
Table of Contents
Constructor
o new Slick.Grid
Core
o init
o getData
o setData
o getDataItem
o getSelectionModel
o setOptions
Columns
o autosizeColumns
o getColumnIndex
o getColumns
o setSortColumn
o setSortColumns
o updateColumnHeader
Cells
o addCellCssStyles
o canCellBeActive
o canCellBeSelected
o editActiveCell
o getActiveCell
o getCellEditor
o getCellFromEvent
o getCellFromPoint
o getCellNode
o getCellNodeBox
o gotoCell
o navigateDown
o navigateLeft
o navigateNext
o navigatePrev
o navigateRight
o navigateUp
o removeCellCssStyles
o resetActiveCell
o setActiveCell
o setCellCssStyles
Rendering
o getCanvasNode
o getRenderedRange
o getViewport
o invalidate
o invalidateRow
o invalidateRows
o resizeCanvas
o scrollCellIntoView
o scrollRowIntoView
o scrollRowToTop
o updateCell
o updateRow
o updateRowCount
Headers
o getHeaderRow
o getHeaderRowColumn
o getSortColumns
o setHeaderRowVisibility
#1Constructor
#var grid = new Slick.Grid(container, data, columns, options);
container- Container node to create the grid in. This can be a DOM Element, a
jQuery node, or a jQuery selector.
data- Databinding source. This can either be a regular JavaScript array or a
custom object exposing getItem(index) and getLength() functions.
columns- An array of column definition objects. SeeColumn Optionsfor a list of
options that can be included on each column definition object.
options- Additional options. SeeGrid Optionsfor a list of options that can be
included.
Create an instance of the grid.
Example usage, taken fromthe basic Slickgrid example:
var grid;
var columns = [
{id: "title", name: "Title", field: "title"},
{id: "duration", name: "Duration", field: "duration"},
{id: "%", name: "% Complete", field: "percentComplete"},
{id: "start", name: "Start", field: "start"},
{id: "finish", name: "Finish", field: "finish"},
{id: "effort-driven", name: "Effort Driven", field: "effortDriven"}
];
var options = {
enableCellNavigation: true,
enableColumnReorder: false
};
$(function () {
var data = [];
for (var i = 0; i < 500; i++) {
data[i] = {
title: "Task " + i,
duration: "5 days",
percentComplete: Math.round(Math.random() * 100),
start: "01/01/2009",
finish: "01/05/2009",
effortDriven: (i % 5 == 0)
};
}
grid = new Slick.Grid("#myGrid", data, columns, options);
#1Core
#grid.init()
Initializes the grid. Called after plugins are registered. Normally, this is called by
the constructor, so you don't need to call it. However, in certain cases you may
need to delay the initialization until some other process has finished. In that case,
set theexplicitInitializationoption totrueand call thegrid.init()manually.
#grid.getData()
Returns an array of every data object, unless you're usingDataViewin which case
it returns a DataView object.
剩余50页未读,继续阅读
zfc2201
- 粉丝: 13
- 资源: 469
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页