I have a DataGrid that has a data store of the typeL dojox.data.XmlStore. How do I access other xml values for the current node in the function defined in the formatter attribute开发者_如何学运维? I've looked at formatterScope and that seems to be the right direction, but the documentation is very vague. Any ideas?
You can try to pass the store's reference as the value of formatterScope
, then in the formatter
function, you can use this.getValue()
to get values you need.
However I don't think this is a good design. Formatting of a cell should only depends on the data of the cell only. If you need more information to do the formatting, maybe you should re-consider the design of your data store.
精彩评论