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 1: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.
    https://examples3.ext.net/#/GridPane..._Field_Mapping

Similar Threads

  1. [CLOSED] combobox setValue does not work
    By jstifel in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 31, 2014, 11:03 PM
  2. Replies: 3
    Last Post: Jan 07, 2013, 9:22 AM
  3. [CLOSED] Linked Combobox can't work
    By gs_user in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 02, 2012, 7: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, 3: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, 2:29 PM

Tags for this Thread

Posting Permissions