-
Notifications
You must be signed in to change notification settings - Fork 77
What is a supporting widget of gridx? [v1.1]
A gridx supporting widget or utility is anything that works for a gridx. It is not a part of gridx, even if it has some UI.
In Gridx 1.1, supporting widgets and utilities have been moved out of the gridx/modules/
directory and placed in a separate one called gridx/support/
. Currently there are 7 supporting widgets and 3 supporting functions:
Supporter | Type | Sample |
---|---|---|
LinkPager | Widget | |
LinkSizer | Widget | |
DropDownPager | Widget | |
DropDownSizer | Widget | |
GotoPageButton (GotoPageDialog) | Widget | |
Summary | Widget | |
QuickFilter | Widget | |
exporter/toCSV | Function | N/A |
exporter/toTable | Function | N/A |
printer | Function | N/A |
Note that exporter
and printer
are now just functions, accepting a gridx instance as their first argument:
require([ ...... "gridx/support/exporter/toCSV" ], function(......, toCSV){ toCSV(grid, {...}); });
Although they can be used in the Bar
module, as described in this article, they can also be used separately. For example, you can create a gridx/support/LinkPager
widget in another area of your page far from the grid it is working for. All you have to do when creating them, is to pass a grid instance:
var pager = new LinkPager({ grid: grid // a grid instance is expected }); pager.placeAt("someDomNodeFarFromGridx"); pager.startup();
Besides this, it is just like any other ordinary widget. Nothing special.
Yes, you can also write one for yourself, or contribute back here. :-)