05 2012 档案

摘要:Writing custom cell editorsPage HistoryBasic interfacefunction IEditor(args) { // initialize the UI /*********** REQUIRED METHODS ***********/ this.destroy = function() { // remove all data, events & dom elements created in the constructor }; this.focus = function() { //... 阅读全文
posted @ 2012-05-10 00:05 水之原 阅读(260) 评论(0) 推荐(0) 编辑
摘要:Providing data to the gridPage HistoryOverviewThe data is passed to the grid via the constructor and can also be accessed using thesetData(data)andgetData()methods. Data itself can be either an array-like object with alengthproperty and an indexer (data[index]) or a custom data provider implementing 阅读全文
posted @ 2012-05-10 00:02 水之原 阅读(247) 评论(0) 推荐(0) 编辑
摘要:Grid OptionsPage HistoryAs included in the examples or described in stable releases.Booleans:autoEditCell will not automatically go into edit mode when selected.autoHeighteditableenableAddRowIf true, a blank row will be displayed at the bottom - typing values in that row will add a new one.enableAsy 阅读全文
posted @ 2012-05-09 23:59 水之原 阅读(1265) 评论(0) 推荐(0) 编辑
摘要:SlickGrid exposes the following events:onScrollonSortonHeaderContextMenuonHeaderClickonMouseEnteronMouseLeaveonClickonDblClickonContextMenuonKeyDownonAddNewRowonValidationErroronViewportChangedonColumnsReorderedonColumnsResizedonCellChangeonBeforeEditCellonBeforeCellEditorDestroyonBeforeDestroyonAct 阅读全文
posted @ 2012-05-09 23:57 水之原 阅读(720) 评论(0) 推荐(0) 编辑
摘要:Model API:Instead of passing SlickGrid an array of row objects, you can pass an object that holds (and updates!) all your rows. This object, which SlickGrid calls aModel, only needs to respond to a simple API:model.getItem(i) // Returns the ith rowmodel.getLength() // Returns the number of itemsRow 阅读全文
posted @ 2012-05-09 23:54 水之原 阅读(3296) 评论(0) 推荐(0) 编辑
摘要:Although the source of thefirst exampleis self-explanatory, it's worth to point out the basics of SlickGrid. The following line:var slickgrid = new Slick.Grid("#node", rows, columns, options);initializes -but doesn't display- SlickGrid, asigning its interface to theslickgridvar. No 阅读全文
posted @ 2012-05-09 23:46 水之原 阅读(2284) 评论(1) 推荐(1) 编辑
摘要:编程世界里只存在两种基本元素,一个是数据,一个是代码。编程世界就是在数据和代码千丝万缕的纠缠中呈现出无限的生机和活力。 数据天生就是文静的,总想保持自己固有的本色;而代码却天生活泼,总想改变这个世界。 你看,数据代码间的关系与物质能量间的关系有着惊人的相似。数据也是有惯性的,如果没有代码来施加外力,她总保持自己原来的状态。而代码就象能量,他存在的唯一目的,就是要努力改变数据原来的状态。在代码改变数据的同时,也会因为数据的抗拒而反过来影响或改变代码原有的趋势。甚至在某些情况下,数据可以转变为代码,而代码却又有可能被转变为数据,或许还存在一个类似E=MC2形式的数码转换方程呢。然而,就是在数... 阅读全文
posted @ 2012-05-02 00:58 水之原 阅读(765) 评论(1) 推荐(3) 编辑

点击右上角即可分享
微信分享提示