Wednesday, September 18, 2019

Dojo grid events and stores



Example

gridBlog.on("RowClick", function(evt){
var idx = evt.rowIndex,
rowData = gridBlog.getItem(idx);
console.log(rowData.col1);
}, true);


Complete events list


Available stores in Dojo









ItemFileWriteStore vs Memory?

The dojo/store API is intended to be the next step forward, replacing dojo/data. Therefore, dojo/store is recommended from a best/modern practices point of view.

However, assuming you're talking about dojox/grid, that component only knows how to consume dojo/data stores. That leaves you with two options:

Use dojo/data/ItemFileWriteStore
Use dojo/store/Memory wrapped in dojo/data/ObjectStore (which wraps a dojo/store with dojo/data APIs so that consumers of old stores can work with it)
Another thing worth considering is that dojo/store/Memory doesn't support directly pulling data in from a URL, while dojo/data/ItemFileWriteStore does.
If you're intending to load your data from another URL, you can still use dojo/store/Memory, but you'd have to XHR the data yourself first.





For more information about DOJO GUI
https://ux.mailchimp.com/patterns/forms#radio

New Grid in dojo has name GridX
for more information visit

https://xcellerant.wordpress.com/2014/12/10/gridx-in-xpages-16-advanced-searching-with-the-filterbar-module/

https://oria.github.io/gridx/demos/test_grid.html

https://github.com/oria/gridx/wiki/How-to-add-bars-to-gridx%3F-%5Bv1.1%5D



No comments: