Recent Weblogs

Links I like

Next

GridBase v2.0

For a long time I've struggled with the idea of a very basic class to implement some easy grid API functions and events to deal with grids in HTML(tables).

Strive for Behavior

All I really wanted was predictable behavior with an extended event API to make things like click and drag easier. I've accomplished this thanks to the EventDispatcher class. The GridBase class applies event listeners to the cells and rows and dispatches specific events.

GridBase
Methods
voidsetTable(table)
A method to set the internal identifier of the table object that it should perform upon
HTMLElement TDgetCell(int row, int cell)
accepts two integers, one corresponding to the row number and the second referrering to the column number, this method should return a table cell element
Events
Eventcellover
Occurs when the mouse moves over a cell element
Eventcellout
Occurs when the mouse moves out of a bounding cell element
Eventcelldown
Occurs when the mouse button is pressed on a cell element
Eventcellup
Occurs when the mouse button is lifted on a cell element
Eventcellclick
Occurs when when a cell is clicked
Eventcellover
Occurs when the mouse moves over a cell element
Eventrowover
Occurs when the mouse moves over a table row element
Eventrowout
Occurs when the cursor moves out of a bounding table row element
Eventtableover
Occurs when the cursor moves inside the table
Eventtableout
Occurs when the cursor leaves the bounding table
Eventtabledown
Occurs when the mouse button is pressed when over the table
Eventtableup
Occurs when the mouse button is lifted on the table

Comments are Disabled.