.. _dojox/data/HtmlTableStore: dojox.data.HtmlTableStore ========================= **NOTE:** This store is deprecated. Please use :ref:`dojox.data.HtmlStore `. :Status: Contributed, Draft :Version: 1.0 :Author: Jared Jurkiewicz :Available: since V1.0 .. contents:: :depth: 3 HtmlTableStore is a simple read-only store provided by Dojo and contained in the DojoX project. HtmlTableStore is a read interface to work with HTML tables with a generally set format. HTML tables are common ways for Web data to be displayed and they can be extremely useful as an alternate representation of data that is displayed in a charting or gauge widget. This store was created so that widgets, that can use dojo.data data stores, can read their input from HTML table data islands in the current page or in a remote page URL. This store implements both dojo.data.api.Read and dojo.data.api.Identity. The following example shows an HTML table that this store can read: :: Books2.html
isbn title author
A9B57C Title of 1 Author of 1
A9B57F Title of 2 Author of 2
A9B577 Title of 3 Author of 3
A9B574 Title of 4 Author of 4
A9B5CC Title of 5 Author of 5
**Note:** The table rows in the tag are the items. The tag is used for defining the attribute name for each column in the table row for an item. ================== Constructor params ================== The constructor for HtmlTableStore takes the following possible parameters in its keyword arguments: +-------------+------------------------------------------------------------------------------------------+----------------------+ | **name** | **description** | **type** | +-------------+------------------------------------------------------------------------------------------+----------------------+ |url |The URL from which to load the HTML file containing the HTML table. This is optional. | string | +-------------+------------------------------------------------------------------------------------------+----------------------+ |tableId |The id of the HTML tag that contains the table to read from, in either a remote page (if | string | | |the URL was passed) or in the current HTML DOM if the url parameter is null. This is | | | |required. | | +-------------+------------------------------------------------------------------------------------------+----------------------+ =============== Item Attributes =============== The item attributes are defined by the tag of the referenced table. Each column name becomes the attribute name for that column when generating the data store view of the data. ============ Query Syntax ============ The query syntax is identical to :ref:`dojo.data.ItemFileReadStore `. Please refer to it for the format of the queries. ======== Examples ======== Connecting HtmlTableStore to dijit.form.ComboBox ------------------------------------------------ .. cv-compound :: .. cv :: javascript .. cv :: html Combo lookup of isbn
Connecting HtmlTableStore to dojox.grid.DataGrid ------------------------------------------------ .. cv-compound :: .. cv :: javascript .. cv :: html Standard HTML table:
isbn title author
A9B57C Title of 1 Author of 1
A9B57F Title of 2 Author of 2
A9B577 Title of 3 Author of 3
A9B574 Title of 4 Author of 4
A9B5CC Title of 5 Author of 5


dojox.grid.DataGrid connected to the above table:
.. cv:: css