ComboBox in GridPanel does not work, Ext.net 3.1.

  1. #1

    ComboBox in GridPanel does not work, Ext.net 3.1.

    I have a ComboBox within a GridPanel that behind the ID and the Company Name , is as follows: The problem in question is that the select an item from the ComboBox it only shows the ID ( ValueField ), and is set to show the name ( displayField ) .. this only happens within the GridPanel , already tested elsewhere and functions normally. Can anyone help me?

    <ext:Store ID="StoreEmpresas" runat="server" >
                <Model>
                    <ext:Model runat="server">
                        <Fields>
                            <ext:ModelField Name="CodigoEmpresa" />
                            <ext:ModelField Name="NomeEmpresa" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>    
    
    <ext:GridPanel ID="GridAtributo" runat="server" Title="Filiais" Region="Center" Header="False" Scroll="Vertical" AutoScroll="True">               
            <ColumnModel runat="server">
                <Columns>        
                    <ext:Column runat="server" Text="Atributo" DataIndex="IdAttribute" Flex="1">
                        <Editor>
                            <ext:ComboBox ID="cboEmpresa" runat="server" DisplayField="NomeEmpresa" ValueField="CodigoEmpresa" FieldLabel="Empresa"  StoreID="StoreEmpresas" LabelAlign="Top">
                                    <DirectEvents>
                                        <Expand OnEvent="cboEmpresa_Expand" />
                                    </DirectEvents>                       
                            </ext:ComboBox> 
                        </Editor>
                    </ext:Column>
                </Columns>
            </ColumnModel>
     </ext:GridPanel>
    Last edited by Daniil; Jul 17, 2015 at 2:40 PM. Reason: Please use [CODE] tags
  2. #2
    Hi @brunopontes,

    The problem in question is that the select an item from the ComboBox it only shows the ID ( ValueField )
    I guess when you just select an item, it is okay, but when you blur the ComboBox then an actual GridPanel's cell should a ValueField, right?

    You should define a Column's Renderer as in this example for the Department Column.
    http://examples.ext.net/#/GridPanel/..._Field_Mapping

Similar Threads

  1. [CLOSED] combobox setValue does not work
    By jstifel in forum 2.x Premium Help
    Replies: 4
    Last Post: Apr 01, 2014, 12:03 AM
  2. Replies: 3
    Last Post: Jan 07, 2013, 10:22 AM
  3. [CLOSED] Linked Combobox can't work
    By gs_user in forum 2.x Premium Help
    Replies: 2
    Last Post: May 02, 2012, 8:26 AM
  4. Two binding combobox not work by items way
    By animalisme in forum 1.x Help
    Replies: 1
    Last Post: Sep 28, 2009, 4:30 AM
  5. ComboBox won't work with .net 2.0
    By msnyder0 in forum 1.x Help
    Replies: 1
    Last Post: Nov 06, 2008, 3:29 PM

Tags for this Thread

Posting Permissions