May 14, 2014, 1:00 PM
[CLOSED]Style in one column only if the cell's value is greater than 0
In my GridPanel, I have to set style in one column only if the cell's value is greater than 0. How can I do this? In the same column, I have a format float <Renderer Fn="Ext.util.Format.numberRenderer('.0,00 /i')" />. I try to put <Renderer Handler="if (value > 0) metadata.css = 'red-label'; return value;" />, but don't work the format float. If I apply one css Css="background-color:#FF8080;", all cells are the style. Follows my code:
<ext:GridPanel ID="grdControleCredito" runat="server" Layout="Form" StripeRows="true" TrackMouseOver="true" Height="80" AutoScroll="true">[
<Store>
<ext:Store ID="Store2" runat="server">
<Reader>
<ext:JsonReader runat="server">
<Fields>
<ext:RecordField Name="VlrDevidoAtrasado" Type="Float" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ToolbargrdControleCreditoColumnModel" runat="server">
<Columns>
<ext:Column Header="Vlr Dev. Atrasado" Width="110" DataIndex="VlrDevidoAtrasado" Align="Right" Css="background-color:#FF8080;">
<Renderer Fn="Ext.util.Format.numberRenderer('.0,00 /i')" />
</ext:Column>
</Columns>
</ColumnModel>
<Plugins>
<ext:GridFilters ID="GridFilters1" runat="server" Local="true" FiltersText="Filtro">
<Filters>
<ext:NumericFilter DataIndex="VlrDevidoAtrasado" />
</Filters>
</ext:GridFilters>
</Plugins>
<SelectionModel>
<ext:RowSelectionModel ID="grdControleCreditoRowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
Last edited by romeu; May 15, 2014 at 12:37 PM.
Reason: [CLOSED]