[CLOSED] Error with Mapping property on Store

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Error with Mapping property on Store

    Hi,
    I can't get the mappingName property work.
    In debug I see "new_Famiglia.Name" has got a value but I got this error: "Run-time Error of Microsoft JScript: 'new_Famiglia.Name' is null or is not an object" (see image with Italian error message).
    Click image for larger version. 

Name:	error.png 
Views:	71 
Size:	24.5 KB 
ID:	5256
    The "IncidentId" field is displayed.
    Where am I wrong?

    I can't send a working example as my data source is Microsoft CRM OData protocol.

    Please, can you help me?
    Thanks in advance
    Marco

    .aspx
           <ext:GridPanel ID="gpTicketMonitor" 
                runat="server"     
                Title="Ticket Monitor"                
                >
                <Store>
                    <ext:Store ID="Store1" runat="server">
                        <Model>
                            <ext:Model ID="Model1" runat="server">
                                <Fields>                            
                                <ext:ModelField Name="IncidentId"  />
                                <ext:ModelField Name="new_Famiglia" Mapping="new_Famiglia.Name"   />
                                 </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                         <ext:Column runat="server" Text="IncidentId" DataIndex="IncidentId" />
                         <ext:Column runat="server" Text="new_Famiglia" DataIndex="new_Famiglia" />
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
    WebService Method
           [WebMethod]
            public DataServiceCollection<Incident> getIncident_List()
            {
                DataServiceCollection<Incident> IncidentCollection;
    
                var query = from c in _context.IncidentSet
                            where c.IncidentId == new Guid("c63d4f0e-7340-e211-90fe-00155dde0185")
                            select new Incident
                            {
                                IncidentId = c.IncidentId,
                                  new_Famiglia = c.new_Famiglia
                            };
    
                IncidentCollection = new DataServiceCollection<Incident>();
                IncidentCollection.Load(query);
    
                return IncidentCollection;
            }

    .cs
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!X.IsAjaxRequest)
                {
                    DataWebService wsData = new DataWebService();
    
                    this.Store1.DataSource = wsData.getIncident_List();
    
                    this.Store1.DataBind();
                }
    
            }
    Last edited by Baidaly; Dec 08, 2012 at 12:16 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Mapping gridpanel to complex store
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 26, 2012, 4:53 AM
  2. [CLOSED] Mapping RecordField to a property with param
    By cmack in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 26, 2011, 4:38 PM
  3. [CLOSED] Bug in Store Mapping
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 30, 2011, 11:05 AM
  4. Datatable and Store columns mapping
    By QualityCode in forum 1.x Help
    Replies: 0
    Last Post: Dec 16, 2010, 8:45 PM
  5. mapping more complex objects to a Store
    By principal_X in forum 1.x Help
    Replies: 2
    Last Post: Jan 26, 2009, 6:16 PM

Posting Permissions