I am trying to implement this example:

But when I click to expand the outer grid I receive this error:

Uncaught TypeError: Cannot read property 'type' of null
By using breakpoints I found out that the error occurred after returning from the DirectMethod. I don't post the code for the outer grid (misArtStore) because is working correctly.

Here is my code:


                                        Title="Expander Rows with GridPanel"
                                            <ext:Store ID="misArtStore" runat="server">
                                                    <ext:Model runat="server" IDProperty="Id">
                                                            <ext:ModelField Name="Id" />
                                                            <ext:ModelField Name="missing" />
                                        <ColumnModel runat="server">
                                                <ext:Column runat="server" Text="Artifacts" DataIndex="missing" Flex="1" Hideable="false" />
                                            <ext:RowExpander runat="server">
                                                <Loader runat="server" DirectMethod="#{DirectMethods}.GetGrid" Mode="Component">
                                                    <LoadMask ShowMask="true" />
                                                        <ext:Parameter Name="id" Value="this.record.getId()" Mode="Raw" />
Code Behind

            public string GetGrid(Dictionary<string, string> parameters)
                string id = parameters["id"];
                DALP.PDBDataContext dc = new DALP.PDBDataContext();
                DAL.AdminDataContext ds = new DAL.AdminDataContext();
                string uname = HttpContext.Current.User.Identity.Name;
                var clientid = (from u in ds.ClientUsers            
                                where u.UserName == uname
                                select u.ClientId);
                var sites = (from mc in dc.TMFCategories //sites is populated correctly
                            join mat in dc.TMFTemplateCts on mc.Id equals mat.Catid
                            join st in dc.Sites on mat.ctid equals st.CTid
                            where ( (!dc.TMFFiles.Any(x=>x.SiteId==st.Siteid)) && mat.Required == true && mat.Clientid == int.Parse(clientid.First().ToString()) && mat.ctid == ctid && mc.Id == Convert.ToInt32(id)) 
                            select new { Siteid = st.Siteid, Site = st.FullName });
                GridPanel grid = new GridPanel
                    Height = 200,
                    EnableColumnHide = false,
                    Store =
                    new Store
                        Model = {
                            new Model {
                                IDProperty = "Siteid",
                                Fields =
                                    new ModelField("Siteid"),
                                    new ModelField("Site")
                        DataSource = sites
                    ColumnModel =
                        Columns =
                        new Column { Text = "Site", DataIndex = "Site", Width = 150 }
                return ComponentLoader.ToConfig(grid);
Chrome Console:

> Uncaught TypeError: Cannot read property 'type' of null

at F.setLayout (ext.axd:19)
at F.getLayout (ext.axd:19)
at F.add (ext.axd:19)
at g.Ext.ComponentLoader.Renderer.Component (ext.axd:445)
at g.onComplete (ext.axd:495)
at Object.complete (ext.axd:463)
at Object.userSuccess (ext.axd:268)
at F.executeScriptDelay (ext.axd:256)
at F.executeScript (ext.axd:255)
at F.requestSuccessHandler (ext.axd:248)