Mar 11, 2010, 10:19 PM
[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
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>