[CLOSED] help Microsoft JScript runtime error: 'this.getRow(...)' is null or not an object

  1. #1

    [CLOSED] help Microsoft JScript runtime error: 'this.getRow(...)' is null or not an object

    hi guys,
    I need help. after I expand the row when I click on the last row in the sub grid I get javascript error. Can you help

    
    
    
    
    
    
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>
    
    
    <%@ Import Namespace="System.Collections.Generic"%>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <script runat="server">
    
    
    protected void Page_Load(object sender, EventArgs e)
    
    
    {
    
    
    if (X.IsAjaxRequest)
    
    
    {
    
    
    
    
    
    return;
    
    
    }
    
    
    List<Evaluation_Period> eval = new List<Evaluation_Period>();
    
    
    eval.Add(new Evaluation_Period { Period_id=new Guid("00000000-0000-0000-0000-000000000000"), Evaluation_year="2009" });
    
    
    stEval.DataSource = eval;
    
    
    stEval.DataBind();
    
    
    }
    
    
    
    
    
    protected void BeforeExpand(object sender, DirectEventArgs e)
    
    
    {
    
    
    string id = e.ExtraParams["id"];
    
    
    string pid = e.ExtraParams["pid"];
    
    
    
    
    
    this.storeCountryAging.DataSource = new object[]
    
    
    {
    
    
    new object[] { "3m Co", 71.72, 0.02},
    
    
    new object[] { "Alcoa Inc", 29.01, 0.42},
    
    
    
    
    
    };
    
    
    this.storeCountryAging.DataBind();
    
    
    }
    
    
    
    
    
    public class Evaluation_Period
    
    
    {
    
    
    public Guid Period_id
    
    
    {
    
    
    get;
    
    
    set;
    
    
    }
    
    
    public string Evaluation_year
    
    
    {
    
    
    get;
    
    
    set;
    
    
    }
    
    
    }
    
    
    </script>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    
    
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    
    <head id="Head1" runat="server">
    
    
    
    
    
    
    
    
    
    
    
    </head>
    
    
    <body>
    
    
    <form id="Form1" runat="server">
    
    
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
    
    
    
    
    <h1>RowExpander Plugin with FormPanel Detail</h1>
    
    
    
    
    
    <ext:Store ID="stEval" runat="server">
    
    
    <Reader>
    
    
    <ext:JsonReader IDProperty="ID">
    
    
    <Fields>
    
    
    <ext:RecordField Name="Period_id" />
    
    
    <ext:RecordField Name="Evaluation_year" />
    
    
    </Fields>
    
    
    </ext:JsonReader>
    
    
    </Reader>
    
    
    </ext:Store>
    
    
    
    
    
    
    
    
    <ext:Store ID="storeCountryAging" runat="server">
    
    
    <Reader>
    
    
    <ext:ArrayReader IDProperty="ID">
    
    
    <Fields>
    
    
    <ext:RecordField Name="Country" />
    
    
    <ext:RecordField Name="AgingFactor" />
    
    
    <ext:RecordField Name="Period_id" />
    
    
    </Fields>
    
    
    </ext:ArrayReader>
    
    
    </Reader>
    
    
    </ext:Store> 
    
    
    
    
    
    <ext:GridPanel ID="grEval" runat="server" StoreID="stEval" Width="800" Height="600" >
    
    
    <ColumnModel ID="ColumnModel1" runat="server">
    
    
    <Columns>
    
    
    <ext:Column Header="Evaluation Year" DataIndex="Evaluation_year" />
    
    
    </Columns>
    
    
    </ColumnModel>
    
    
    
    
    
    <SelectionModel>
    
    
    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
    
    
    </SelectionModel>
    
    
    <View>
    
    
    <ext:GridView ID="GridView1" runat="server" ForceFit="true" />
    
    
    </View>
    
    
    <Plugins>
    
    
    <ext:RowExpander ID="RowExpander1" runat="server" EnableCaching="true">
    
    
    <Component>
    
    
    <ext:GridPanel ID="grCountries" StoreID="storeCountryAging" TrackMouseOver="true" runat="server" Width="500" Height="300">
    
    
    <ColumnModel runat="server" ID="ColumnModel3">
    
    
    <Columns>
    
    
    <ext:Column DataIndex="Country" Header="Country" />
    
    
    <ext:Column DataIndex="AgingFactor" Header="Aging Factor" />
    
    
    </Columns> 
    
    
    </ColumnModel>
    
    
    <View>
    
    
    <ext:GridView ID="GridView2" runat="server" ForceFit="true" />
    
    
    </View>
    
    
    <SelectionModel>
    
    
    <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" />
    
    
    </SelectionModel>
    
    
    </ext:GridPanel>
    
    
    </Component>
    
    
    
    
    
    <DirectEvents>
    
    
    <BeforeExpand 
    
    
    OnEvent="BeforeExpand" >
    
    
    
    
    
    <ExtraParams>
    
    
    <ext:Parameter Name="pid" Value="record.data['Period_id']" Mode="Raw" />
    
    
    <ext:Parameter Name="id" Value="record.data['Evaluation_year']" Mode="Raw" />
    
    
    </ExtraParams>
    
    
    </BeforeExpand>
    
    
    </DirectEvents>
    
    
    </ext:RowExpander>
    
    
    </Plugins>
    
    
    </ext:GridPanel>
    
    
    </form>
    
    
    </body>
    
    
    </html>
  2. #2

    RE: [CLOSED] help Microsoft JScript runtime error: 'this.getRow(...)' is null or not an object

    Hi,

    Grid doesn't support another grid inside row's body because events from child grid affect on the parent grid
    Therefore need swallow events from child grid
    Add the following listener to the RowExpander
    <Expand Handler="Ext.fly(body).swallowEvent(['click', 'mousedown', 'mouseup', 'dblclick'], true);" />
    Also I can recommend disable columns moving for the grid inside row expander (just events swallowing gives short header's flickering if you click on the grid's header)
  3. #3

    RE: [CLOSED] help Microsoft JScript runtime error: 'this.getRow(...)' is null or not an object

    Thank you so much

Similar Threads

  1. Replies: 0
    Last Post: Sep 29, 2011, 4:46 PM
  2. Replies: 3
    Last Post: Mar 04, 2011, 11:08 AM
  3. Replies: 0
    Last Post: Mar 04, 2011, 10:52 AM
  4. [CLOSED] Microsoft JScript runtime error: 'elements.length' is null or not an object
    By Jean-Pierre Poulin in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 19, 2010, 9:43 AM
  5. Replies: 0
    Last Post: Aug 27, 2009, 6:13 PM

Posting Permissions