| Handle to the Grid cell metadata passed to a Grid Column Renderer. This allows
fine grained coltrol to the column Renderer to custom render a grid cell. You can
customize a Grid cell appearance by either using
CellMetadata.setCssClass(String) or
CellMetadata.setHtmlAttribute(String) . There is a subtle difference between the two methods that is best illustrated
by an example.
So when cellMetadata.setHtmlAttribute("style=\"background:yellow;\""); is called, the DIV within the cell TD has its attributes set.
<td tabindex="0" class="x-grid-col x-grid-td-2 x-grid-cell-6-2 x-grid-dirty-cell x-grid-cell-selected" id="ext-gen353">
<div class="x-grid-col-2 x-grid-cell-inner"><div style="background: yellow none repeat scroll 0%; -moz-background-clip:-moz-initial; -moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;" unselectable="on" class="x-grid-cell-text">$4.41</div>
</div>
</td>
And when setCssClass is called, it sets the CSS on the TD element. As an example, when cellMetadata.setCssClass("mystyle") is called the rendered html for the cell is
<td tabindex="0" class="x-grid-col x-grid-td-2 x-grid-cell-6-2 x-grid-dirty-cell x-grid-cell-selected mystyle" id="ext-gen353"><div class="x-grid-col-2 x-grid-cell-inner">
<div style="-moz-background-clip: -moz-initial; -moz-background-origin:-moz-initial; -moz-background-inline-policy: -moz-initial;"unselectable="on" class="x-grid-cell-text">$4.41</div></div>
</td>
See Also: ColumnConfig.setRenderer(Renderer) See Also: com.gwtext.client.widgets.grid.Renderer |