[Dojo-interest] data grid column formatter - global function

Guillaume ORIOL go.lists at technema.fr
Fri Mar 12 04:36:57 EST 2010


Not sure to understand the way to do it. What does represent 
this._myGrid in your example?

If you declare a grid programmatically, what would be the proper way to 
set its formatterScope attribute?

     myGrid = new dojox.grid.DataGrid({
             store: myStore,
             structure: myLayout,
             ...
         },
         document.createElement("div"));
     myGrid.attr("formatterScope", ???);

Thanks
--
Guillaume

> Hello James,
>
> in dojo 1.4 DataGrid comes with a parameter called "formatterScope". So
> you can do the following inside your class:
>
> this._myGrid.attr("formatterScope",this);
>
> hope this help!
>
> On Thu, Mar 11, 2010 at 5:34 PM, James Cantwell
> <jimmycantwell at excite.com <mailto:jimmycantwell at excite.com>> wrote:
>
>
>     Hi,
>     I have a templated widget that contains a data grid. The grid has a
>     formatter on one of the columns to render images, I was wondering is
>     there a
>     way to specify this formatter as a function in the widget class
>     instead of
>     as a global function?
>     --
>     View this message in context:
>     http://n3.nabble.com/data-grid-column-formatter-global-function-tp442771p442771.html
>     Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>     _______________________________________________
>     FAQ: http://dojotoolkit.org/support/faq
>     Book: http://docs.dojocampus.org
>     Dojo-interest at mail.dojotoolkit.org
>     <mailto:Dojo-interest at mail.dojotoolkit.org>
>     http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


-- 
Guillaume ORIOL
Software engineer
Technema


More information about the Dojo-interest mailing list