[CLOSED] Renderer doesn't work

  1. #1

    [CLOSED] Renderer doesn't work

    var TipoDatoRenderer = function (value) {
                  r = App.dsTipoValorIngreso.getById(value);
                              alert(r);
    
                              if (Ext.isEmpty(r)) {
                                 return "error";
                              }
    
                               return r.data.Name;
             };

    this function would set the text with an ID from the data base, but only show the index from the Combobox,
    someone Know how i can do this ??
    Last edited by Daniil; Oct 15, 2013 at 6:37 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi @Gisystems,

    Welcome to the Ext.NET forums!

    So, does it not retrieve a record?
    App.dsTipoValorIngreso.getById(value)
    Is the TipoDatoRenderer executed as well? If no, is there such a thing?
    <Renderer Handler="TipoDatoRenderer">
    If yes, please try with
    <Renderer Fn="TipoDatoRenderer">
    It is hard to say something concrete. Too much guesswork. Could you provide a full test case? I think the problem will be resolved very quickly in that case.
  3. #3

    Renderer doesn't work

    <ext:ComponentColumn ID="TipodeDato" Mode="Local" Editor="true" Width="25" Text="Tipo Importe" DataIndex="IdTipoDato" Name="ColumnTipoDato" TriggerAction="All"     runat="server">
                              
                                     <Renderer fn="TipoDatoRenderer"/>
                               
                               <Component>
                              
                              
                               <ext:ComboBox ID="ComboBox3"  SelectOnFocus="true" TriggerAction="All"    StoreID="dsTipoValorIngreso" DisplayField="DescripcionTipoDato" ValueField="IdTipoDato" Mode="Local" Width="15" runat="server"  EmptyText="Seleccion">
                               
                              
                                   
                        </ext:ComboBox>
    this is complete tag
    Last edited by Daniil; Oct 10, 2013 at 3:26 AM. Reason: Please use [CODE] tags
  4. #4
    Had similar problem so wanted to just chime in if it can help...

    Read this posting (last few comments). http://forums.ext.net/showthread.php...rer-from-Store

    Load the grid after the store that backs the combo loads. I have been fighting this also.

    /Z
    Last edited by Z; Oct 09, 2013 at 3:49 PM.
  5. #5
    Quote Originally Posted by Daniil View Post
    Hi @Gisystems,

    Welcome to the Ext.NET forums!

    So, does it not retrieve a record?
    App.dsTipoValorIngreso.getById(value)
    Is the TipoDatoRenderer executed as well? If no, is there such a thing?
    <Renderer Handler="TipoDatoRenderer">
    If yes, please try with
    <Renderer Fn="TipoDatoRenderer">
    It is hard to say something concrete. Too much guesswork. Could you provide a full test case? I think the problem will be resolved very quickly in that case.
    ok, I'm going to send you a piece of the code completely
    <ext:FormPanel runat="server" Height="400" Title="Ingresos">
                                <Items>
    
                              <ext:GridPanel X="5" Y="10" runat="server" Height="350" Width="625"    ID="GridIngresos"  Selectable="true" Hidden="true"  Frame="true" ForceFit="true" EnableViewState="false">
                              
                              <Plugins>
                                    <ext:CellEditing ID="CellEditing3" runat="server" ClicksToEdit="1"></ext:CellEditing>
                              </Plugins>
                               
                               <TopBar>
                                <ext:ToolBar ID="ToolBar4" runat="server">
                                    <Items>
                                    <ext:Button ID="btnAgregarIngreso" runat="server" Icon="Add" Text="Agregar Ingreso">
                                        <Listeners>
                                        <Click Handler="InsertarFila(#{Store1}.getCount());"/>
                                        </Listeners>
                                    </ext:Button>
                                    </Items>
                            <items>
                            <ext:Button ID="btnGuardarIngreso" runat="server" Icon="Disk" Text="Guardar">
                            <Listeners>
                            <Click Handler="guardar(this);" />
                            </Listeners>
                        </ext:Button>
                    </items>
    
                    <items>
                            <ext:Button ID="Button2" runat="server" Icon="Disk" Text="Eliminar">
                            <Listeners>
                            <Click Handler="eliminar(this);" />
                            </Listeners>
                        </ext:Button>
                    </items>
    
    
                </ext:ToolBar>
            </TopBar>
    
                  
                  
                     <Store>
                        <ext:Store AutoLoad="false" ID="Store1" runat="server" PageSize="45" 
                        OnReadData="CargarDatosGridIngreso"
                        OnBeforeRecordInserted="InsertarGridIngreso"
                        OnBeforeRecordUpdated="GrabarRegistroIngresoGrid"
                        OnBeforeRecordDeleted="EliminarGridIngreso">
                        
                               
                                <Model>
                                    <ext:Model ID="Model11" runat="server">
                                        <Fields>
                                        <ext:ModelField  Name="IdIngreso" type="int" />
                                        <ext:ModelField Name="DescripcionIngreso" Type="String" />
                                        <ext:ModelField Name="MontoIngreso" Type="float" />
                                        <ext:ModelField  Name="TipoOperacion" Type="String" />
                                        <ext:ModelField  Name="IdTipoDato" Type="int" />
                                        <ext:ModelField Name="IdEmpleado" Type="Int" />
                                        
                                          
                                                           
                                        </Fields>
                                    </ext:Model>
                                </Model>
                           </ext:Store>
        
                    </Store>
    
                     <ColumnModel  ID="ColumnModel3" runat="server">
                            <Columns>
                                <ext:Column Width="15" ID="Column9" runat="server" Text="Cod Ingreso" DataIndex="IdIngreso" />
                                <ext:Column ID="Column10" Width="50" runat="server" Text="Descripcion" DataIndex="DescripcionIngreso">
                                <Editor>
                                    <ext:TextField ID="TextField4" runat="server">
                                
                                    </ext:TextField>
                                </Editor>
                                </ext:Column>
                                <ext:Column ID="Column11" Width="25" runat="server" Text="MontoIngreso" DataIndex="MontoIngreso">
                                <Editor>
                                <ext:TextField ID="TextField8" runat="server">
                                
                                </ext:TextField>
                                </Editor>
                                </ext:Column>
                                <ext:Column   ID="Column12" width="25"  runat="server" Text="Tipo Operacion"  DataIndex="TipoOperacion">
                                <Editor>
                                <ext:TextField ID="TextField9" Text ="+"  runat="server">
                                </ext:TextField>
                                </Editor>
                                </ext:Column>
                                
                               <ext:ComponentColumn ID="TipodeDato" Mode="Local" Editor="true" Width="25" Text="Tipo Importe" DataIndex="IdTipoDato" Name="ColumnTipoDato" TriggerAction="All"     runat="server">
                              
                                     <Renderer fn="departmentRenderer"/>
                               
                               <Component>
                              
                              
                               <ext:ComboBox ID="ComboBox3"  SelectOnFocus="true" TriggerAction="All"    StoreID="dsTipoValorIngreso" DisplayField="DescripcionTipoDato" ValueField="IdTipoDato" Mode="Local" Width="15" runat="server"  EmptyText="Seleccion">
                               
                              
                                   
                        </ext:ComboBox>
                               
                               </Component>
                               
                               </ext:ComponentColumn>
                               
    
                                <ext:Column ID="Column1" width="15" runat="server" Text=""  DataIndex="IdEmpleado">
                                <Editor>
                                <ext:TextField ID="TextField1" Hidden="true" runat="server"></ext:TextField>
                                </Editor>
                                </ext:Column>
    
                                
                               
                        
                               
                                <ext:ImageCommandColumn Width="15" Text="Guardar" ID="ImageCommandColumn3" runat="server" Align="Center">
                                    <Commands>
                                        <ext:ImageCommand Icon="Accept" CommandName="Pick">
                                            <ToolTip Title="Plant" Text="Click to choose this plant" />
                                        </ext:ImageCommand>
                                    </Commands>
                                    <%--<Listeners>
                                        <Command Handler="" />
                                    </Listeners>--%>
                                </ext:ImageCommandColumn>
                            </Columns>
                                  
                        </ColumnModel>
                        <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                </SelectionModel>
    
                     </ext:GridPanel>
                 </Items>
        </ext:FormPanel>
    Last edited by Daniil; Oct 15, 2013 at 6:36 AM. Reason: Please use [CODE] tags
  6. #6
    Hello!

    Please, wrap your code in CODE tag, paragraph 3 here: http://forums.ext.net/showthread.php?12957

    Also, could you provide a fully runnable sample to reproduce?

Similar Threads

  1. [CLOSED] when gridpanel column apply renderer.format , renderer.fn not work
    By mis@adphk.com in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 12, 2013, 10:35 AM
  2. [CLOSED] Column Renderer Fn doesn't work at first time in TreeGrid
    By profitsistemas in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 20, 2013, 11:34 PM
  3. GridPanel Renderer doesn' work
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Aug 25, 2011, 12:46 PM
  4. [CLOSED] Renderer doesn't fire
    By sharif in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 08, 2010, 5:40 PM
  5. Renderer Fn not work at first time
    By nanosassa in forum 1.x Help
    Replies: 0
    Last Post: May 04, 2009, 12:35 PM

Posting Permissions