View Full Version : [0.8.1] Renderer bug

Jan 22, 2010, 4:43 PM

I have been reading on the net, and I see that ExtJs has a delay field por the renderer, and we dont get it on coolite.

What's going on is when I select my rows on client side, I cant get the first row selected since the grid is still rendering.

You need to use 40+ rows.

Any help would be appreciated.


var renderVeiculo = function (value, metadata, record, rowIndex, colIndex, store){

if (record.data.RVR_IND_DECISAO == 0) {
<%= GridPanelVeiculo.ClientID %>.getSelectionModel().selectRow(rowIndex);

return value;

<ext:Store ID="StoreVeiculo" runat="server">
<ext:JsonReader ReaderID="NURENAVAM">
<ext:RecordField Name="NURENAVAM" />
<ext:RecordField Name="DSPLACAVEICULO" />
<ext:RecordField Name="DSMARCAMODELO" />
<ext:RecordField Name="DSANOFRABRICACAO" />
<ext:RecordField Name="RVR_RTB_NUM_BENEFICIO" />
<ext:RecordField Name="RVR_IND_DECISAO" />
<%--Se está selecionado--%>

<ext:GridPanel AutoHeight="true" AutoExpandColumn="dsMarcaModelo" ID="GridPanelVeiculo"
runat="server" StoreID="StoreVeiculo" StripeRows="true">
<ColumnModel runat="server">
<ext:Column Header="Renavam" Sortable="true" DataIndex="NURENAVAM">
<ext:Column Header="Placa" Sortable="true" DataIndex="DSPLACAVEICULO" />
<ext:Column ColumnID="dsMarcaModelo" Header="Modelo" Sortable="true" DataIndex="DSMARCAMODELO" />
<ext:Column Header="Ano fabricação" Sortable="true" DataIndex="DSANOFRABRICACAO">
<Renderer Fn="renderVeiculo" />
<ext:CheckboxSelectionModel ID="SelectionModelVeiculo" runat="server" />
<ext:PagingToolbar runat="server" PageSize="10" />

Jan 24, 2010, 4:41 AM

Please provide link where did you see that renderer has delay. Listeners only have delay.

Renderer cannot has the delay because it should return value immedeiately.
If you need to set predefined selection then use SelectedRows collection

Jan 24, 2010, 3:36 PM
I had to change to server side, since client side aint working.

This is where i found the code with the delay.


Please, try the client side rendering, it aint working properly. The first row is not being selected.


Jan 24, 2010, 3:45 PM

In that post delay is used for Render event (not grid column renderer). As mentioned in that thread you have to set selection in the Store's Load event (when data is loaded)

Jan 25, 2010, 11:06 AM

I tried as you said, still the selectrow on client side is not working.

Please, have it a try.

<ext:Store ID="StoreVeiculo" runat="server">


<Load Delay="1000" />



Jan 25, 2010, 11:09 AM

You did not define handler for Load event

Load Handler="#{GridPanel1}.getSelectionModel().selectRow(0);" Delay="100"/>

Jan 25, 2010, 12:28 PM
It finally worked! Thanks for your help

the final code

Comments: Since the current ext version in use doesnt support Ext.partition, i had to use a workaround to filter.

<Load Handler="#{GridPanelVeiculo}.getSelectionModel().selectReco rds(#{StoreVeiculo}.query('RVR_IND_DECISAO', 0).getRange());"

Delay="100" />