populate grid row/field from a parent table on a ComboBox

  1. #1

    populate grid row/field from a parent table on a ComboBox

    Hello,

    I'm trying to populate a value on a grid row/field that comes from a parent table on a ComboBox.
    For example, the value in the grid row/field is a SYS_GUID that translates to a row on a reference table. So I have a ComboBox that uses a <ext:Store> that populates the values from that parent table.

    example
    
    <%-- Store for the ComboBox --%>
       <ext:Store ID="storeDivision" runat="server" DataSourceID="SqlDataSourceDivision" AutoLoad="true">
            <Reader>
                <ext:JsonReader ReaderID="DIV_ID">
                    <Fields>
                        <ext:RecordField Name="DIV_ID" />
                        <ext:RecordField Name="DIV_NM" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <SortInfo Field="DIV_NM" Direction="ASC" />
        </ext:Store>
    
    ...
      <ext:Column  ColumnID="REGNL_DIV_DIV_ID" Header="Regional Division" DataIndex="REGNL_DIV_DIV_ID" Width="200" Sortable="true" AutoDataBind="true">
                      <Editor>
                             <ext:ComboBox DataIndex="DIV_ID" ID="Division" runat="server"  StoreID="storeDivision"
                                      DisplayField="DIV_NM" ValueField="DIV_ID" Editable="false" TriggerAction="All"/>
                        </Editor>
    </ext:Column>
    But this still displays a guid value instead of the Division name.
    Could you please tell me what is missing from this syntax to display the actual name instead of the value and populate the ComboBox at the same time?

    Thank you,

  2. #2

    RE: populate grid row/field from a parent table on a ComboBox

    Never mind... it works using the <Renderer Fn="RenderDivisionName" /> function inside the Column. And remember that the Field value in the Javascript function is CASE SENSITIVE!

    Thank You,

Similar Threads

  1. Replies: 0
    Last Post: Jun 08, 2012, 11:49 AM
  2. Replies: 4
    Last Post: Feb 21, 2012, 4:23 AM
  3. [CLOSED] combobox populate
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 17, 2011, 9:08 AM
  4. [CLOSED] How to Populate Combobox on Focus?
    By ISI in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 01, 2011, 5:16 PM
  5. Replies: 12
    Last Post: Jun 30, 2010, 9:31 PM

Posting Permissions