View Full Version : [CLOSED] Ext.net 2 Beta Release: Error when rebuilding grid

Apr 13, 2012, 6:39 PM

After I update source codes of ext.net from subversion and recompile, I'm getting this error when I rebuild my gridPanel.

Runtime Error in Microsoft JScript: Object does not support property or method 'onChange'


I made a little example... please, click in 'Refresh' button to trigger error.

Main Page

<%@ Page Language="vb" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If (Not ExtNet.IsAjaxRequest) Then


End If

End Sub

Protected Sub GridPanel1_BuildSet()
Dim col As Ext.Net.Column.Config

If (ExtNet.IsAjaxRequest) Then
End If

'refaz os campos do modelo
Me.GridPanel1_AddField(New ModelField("ID", ModelFieldType.Int))
Me.GridPanel1_AddField(New ModelField("Nome", ModelFieldType.String))


col = New Ext.Net.Column.Config
col.Width = 70
col.Text = "ID"
col.DataIndex = "ID"
col.Align = Alignment.Right
Me.gridPanel1.ColumnModel.Columns.Add(New Column(col))

col = New Ext.Net.Column.Config
col.Width = 250
col.Text = "Name"
col.DataIndex = "Nome"
col.Align = Alignment.Left
Me.gridPanel1.ColumnModel.Columns.Add(New Column(col))

If (ExtNet.IsAjaxRequest) Then
End If

End Sub

Private Sub GridPanel1_BindSet()

'refresco o grid para disparar o webservice Json

End Sub

Private Sub GridPanel1_AddField(field As ModelField)
If (ExtNet.IsAjaxRequest) Then
End If
End Sub

Protected Sub RefreshGrid(sender As Object, evt As DirectEventArgs)
End Sub


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<form id="form1" runat="server">
<ext:GridPanel runat="server" ID="gridPanel1" EnableColumnHide="false" EnableColumnMove="false" Flex="1" >
<ext:Store runat="server" ID="Store1" IgnoreExtraFields="false" PageSize="10" RemoteSort="true" AutoLoad="false">
<ext:AjaxProxy Json="true" Url="/JSonDataPaging.asmx/getData">
<ActionMethods Read="POST" />
<ext:JsonReader Root="d.Data" TotalProperty="d.TotalRecords" />
<ext:Parameter Name="start" Value="0" Mode="Raw" />
<ext:Parameter Name="limit" Value="10" Mode="Raw" />
<ext:StoreParameter Name="filter" Value="" Mode="Value" />
<ext:Model ID="modelExplorerWebContext" runat="server">
<ext:RowSelectionModel runat="server" ID="rsmExplorerWebContext" Mode="Single"/>
<ext:PagingToolbar ID="tbPaging1" runat="server" />
<ext:Button runat="server" ID="btnRefresh" Text="Refresh">
<Click OnEvent="RefreshGrid" />

WebService JSonDataPaging.asmx and class Person

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports System.Web.Script.Services

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:= WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class JSonDataPaging
Inherits System.Web.Services.WebService

<WebMethod(enableSession:=True)> _
Public Function getData(start As Long, limit As Long, filter As String) As Ext.Net.Paging(Of Person)

Dim vRet As New List(Of Person)

vRet.Add(New Person(1, "Person 01"))
vRet.Add(New Person(2, "Person 02"))
vRet.Add(New Person(3, "Person 03"))
vRet.Add(New Person(4, "Person 04"))
vRet.Add(New Person(5, "Person 05"))
vRet.Add(New Person(6, "Person 06"))
vRet.Add(New Person(7, "Person 07"))
vRet.Add(New Person(8, "Person 08"))
vRet.Add(New Person(9, "Person 09"))

Return New Ext.Net.Paging(Of Person)(vRet, vRet.Count)

End Function

End Class

Public Class Person
Private mvarID As Long
Private mvarNome As String

Sub New(pID As Long, pNome As String)
mvarID = pID
mvarNome = pNome
End Sub

Property ID As String
Return mvarID
End Get
Set(value As String)
mvarID = value
End Set
End Property

Property Nome As String
Return mvarNome
End Get
Set(value As String)
mvarNome = value
End Set
End Property
End Class

Apr 13, 2012, 7:06 PM

Please update from SVN and retest

Apr 13, 2012, 8:47 PM
Hi Vladimir...

Works fine.

Thanks a lot.