[CLOSED] Error with Mapping property on Store

  1. #1

    [CLOSED] Error with Mapping property on Store

    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:	45 
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

           <ext:GridPanel ID="gpTicketMonitor" 
                Title="Ticket Monitor"                
                    <ext:Store ID="Store1" runat="server">
                            <ext:Model ID="Model1" runat="server">
                                <ext:ModelField Name="IncidentId"  />
                                <ext:ModelField Name="new_Famiglia" Mapping="new_Famiglia.Name"   />
                <ColumnModel ID="ColumnModel1" runat="server">
                         <ext:Column runat="server" Text="IncidentId" DataIndex="IncidentId" />
                         <ext:Column runat="server" Text="new_Famiglia" DataIndex="new_Famiglia" />
    WebService Method
            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>();
                return IncidentCollection;

            protected void Page_Load(object sender, EventArgs e)
                if (!X.IsAjaxRequest)
                    DataWebService wsData = new DataWebService();
                    this.Store1.DataSource = wsData.getIncident_List();
    Last edited by Baidaly; Dec 08, 2012 at 12:16 AM. Reason: [CLOSED]
  2. #2
    Can you provide a running example? Which is the type of source variable?
  3. #3
    Hi RCN,
    I am sorry but I can't provide a running example.
    My data source is Microsoft Dynamics CRM and I can't include it in a sample.

    Anyway code seems pretty simple. Can you see anything wrong in it?
    Should I use IsComplex property on "ext:ModelField " to refer the Name property?

    Thanks in advance.
  4. #4
    I found the solution.

    I should use "ServerMapping" instead of "Mapping".

    Thank you anyway.
    You can mark as 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