[CLOSED] Combobox shows Valuefield and no Display field when is dirty.

  1. #1

    [CLOSED] Combobox shows Valuefield and no Display field when is dirty.

    Hello,
    I have a grid with combobox editor. When I change value in the combobox displays the SiteId instead of Site, until I refresh the grid. I changed column's DataIndex to "SiteId" and tried to use a Renderer but with no success.
    Grid Column:
    <ext:Column
                                            runat="server"
                                            Text="Site"
                                            DataIndex="SiteId" //old DataIndex="Site"
                                            Flex="3">
                                            <Filter>
                                                <ext:StringFilter />
                                            </Filter>
                                            
                                            <Editor>
                                                <ext:ComboBox
                                                    ID="cmbSites"
                                                    runat="server"
                                                    Editable="false"
                                                    DisplayField="Site"
                                                    ValueField="Siteid">
                                                    <Store>
                                                        <ext:Store ID="cmbSiteStore" runat="server" OnLoad="cmbSiteStore_Load" >
                                                            <Model>
                                                                <ext:Model ID="Model3" runat="server">
                                                                    <Fields>
                                                                        <ext:ModelField Name="Site" />
                                                                        <ext:ModelField Name="Siteid" />
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>
                                                        </ext:Store>
                                                    </Store>
                                                </ext:ComboBox>                                            
                                            </Editor>
                                            <Renderer Handler="return cmbSiteStore.getById(value).get('Site')" />
                                        </ext:Column>
    Grid Store:
    <ext:Store ID="FilesStore" runat="server" OnReadData="FilesStore_ReadData"  >
                                        <Model>
                                            <ext:Model runat="server">
                                                <Fields>
                                                    <ext:ModelField Name="Site" Type="String" />
                                                    <ext:ModelField Name="SiteId" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
    Last edited by fabricio.murta; Jun 09, 2017 at 6:22 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Hello @atroul!

    Please check this example, it does use combo box as grid field editor and does not have the issue you described -- as far as I could notice, at least.

    - Grid Panel > Data Presentation > Editor Field Mapping

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 0
    Last Post: Sep 30, 2016, 1:55 AM
  2. [CLOSED] Combobox display field custom template
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 15, 2013, 4:11 PM
  3. [CLOSED] Grid cell still shows as dirty after commiting store changes
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 13, 2013, 12:34 AM
  4. Problem ComboBox Display/Value Field
    By DanielU in forum 1.x Help
    Replies: 1
    Last Post: Mar 04, 2013, 10:56 AM
  5. [CLOSED] ComboBox shows ValueField instead of DisplayField in a Grid.
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 06, 2010, 8:38 PM

Tags for this Thread

Posting Permissions