[CLOSED] store is undefined

  1. #1

    [CLOSED] store is undefined

    Hi
    i created usercontrol



    <%@ Register src="t/airlines.ascx" tagname="airlines" tagprefix="uc4" %>
    I added store from example to airlines.ascx:

     SortedList items = new SortedList(); 
     items.Add("1", "akash"); 
     items.Add("2", "kumar"); 
     Store1.DataSource = items; 
     Store1.DataBind();
    
    
    
    <ext:Store runat="server" ID="Store1" AutoLoad="true" SerializationMode="Complex">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="1" />
                    <ext:RecordField Name="2" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    
    
    
    <ext:GridPanel ID="GridPanel4" runat="server" StoreID="Store61" StripeRows="True" 
    TrackMouseOver="true" Border="true" Title="" HideHeaders="False" TitleCollapse="True" Width="400" Height="250">
    <ColumnModel ID="ColumnModel1" runat="server">
        <Columns>
            <ext:Column Header="ID" Sortable="true" DataIndex="AirlineNumber" ColumnID="AirlineNumber" Width="40" />
            <ext:Column Header="Code" Sortable="true" DataIndex="AirlineCode" ColumnID="AirlineCode" Width="40" />
            <ext:Column Header="Name" Sortable="true" DataIndex="AirlineName" ColumnID="AirlineName" Width="200" />
            <ext:Column Header="Select" Sortable="true" DataIndex="select1" ColumnID="select1" Width="40">
            <Renderer Fn="select_airline" /></ext:Column>        
        </Columns>
    </ColumnModel>
    <AjaxEvents><CellClick Type="Load" OnEvent="air_save1">
    <EventMask ShowMask="true" /><ExtraParams>
    <ext:Parameter Name="AirlineNumber" Value="params[0].getStore().getAt(params[1]).get('AirlineNumber')" Mode="Raw" /></ExtraParams>
    </CellClick></AjaxEvents>
    <%--<Listeners><CellClick Fn="cellClick" /></Listeners> --%>
    <View><ext:GridView ID="GridView1" runat="server">
                      <HeaderRows>
                            <ext:HeaderRow>
                                <Columns>
                                    <ext:HeaderColumn Cls="x-small-editor">
                                        <Component>
                                            <ext:ComboBox ID="ComboBox1" runat="server" StoreID="Store1" ValueField="2" DisplayField="1"></ext:ComboBox>               
                                           <%--        <ext:ComboBox ID="CompanyFilter" runat="server" StoreID="Store1"
                                                TriggerAction="All" LazyInit="False">    
                                        <Listeners>
                                                    <Select Handler="applyFilter();" />
                                                </Listeners>  
                                            </ext:ComboBox> --%>
                                        </Component>
                                    </ext:HeaderColumn>
                                    
                                </Columns>
                            </ext:HeaderRow>
                        </HeaderRows>
                    </ext:GridView>
    </View>
    </ext:GridPanel>
    and i am getting javascript error:
    'airlines1_Store1' is undefined
    what is wrong in my code?

    vlad
  2. #2

    RE: [CLOSED] store is undefined

    Hi vlad,

    My first guess is StoreID="Store61" should be StoreID="Store1".


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] store is undefined

    Hi
    Actually but there are 2 stores:
    <ext:GridPanel ID="GridPanel4" runat="server" StoreID="Store61" StripeRows="True" 
    TrackMouseOver="true" Border="true" Title="" HideHeaders="False" TitleCollapse="True" Width="400" Height="250">
    and
    <ext:ComboBox ID="ComboBox1" runat="server" StoreID="Store1" ValueField="2" DisplayField="1"></ext:ComboBox>
    Store61 works good

    but Store1 doesn't work

    Vlad
  4. #4
    It is marked as CLOSED but i canĀ“t find the solution anywhere.
  5. #5
    Hi,

    Please post a sample how to reproduce if you have exactly the issue that it's here. If no, please start a new thread.

Similar Threads

  1. [CLOSED] Object undefined at store parameter
    By mcfromero in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 14, 2012, 6:33 PM
  2. [CLOSED] Store undefined
    By rbarr in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 02, 2012, 10:03 AM
  3. [CLOSED] Dynamic Store: undefined error at client side
    By digitek in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Nov 16, 2011, 10:17 AM
  4. Store is undefined
    By roszman in forum 1.x Help
    Replies: 10
    Last Post: May 26, 2010, 9:26 AM
  5. Replies: 1
    Last Post: Feb 24, 2010, 3:05 PM

Posting Permissions