Recent Weblogs

Links I like



GridBuild adds some great functionality to the GridBase API. Mainly methods to build and populate grid(table) elements.

  • Download the source
  • Next we must define a range of Date Objects that will represent the days in a month. This is accomplished through the GregorianCalendar class.
  • Once the range is defined, we can format it for inserting into the grid by extending the GridBuild class into a subclass called CalendarSelect, this class introduces a very convienent new event.
HTMLElement TablebuildGrid(int row, int col)
Receives two integers specifying the number of rows and columns in the table, returns a table element with the respective size.
voidloadJSON(array obj)
Receives an array of arrays of hash objects. Think two dimensional matrix, if you sent it one array we could populate one row. You send it an array of two arrays we can populate two rows.
voidloadXML(xmldocument obj)
Receives an XML document. The structure represents a grid, much like a table, but instead of tr its "row" and instead of td its "cell".

Protected Methods

There are more methods than described above in the GridBuild class but i would consider them "protected" at the very least. If you want to subclass GridBuild i would recommend browsing the source to see which functions you would like to overwrite. Some of them just iterate but two functions to pay attention to would be applyCellXML and applyCellJSON.

Comments are Disabled.