Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is the error I get:
XML
Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Type 'Ext.Net.JsonReader' does not have a public property named 'Fields'.

Source Error:


Line 84:                             <Reader>
Line 85:                                 <ext:JsonReader IDProperty="ID">
Line 86:                                     <Fields>
Line 87:                                         <ext:RecordField Name="ID" />
Line 88:                                         <ext:RecordField Name="Name" />

Source File: /WebForm1.aspx    Line: 86


This is my Code:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.Store1.DataSource = this.Jobs;
this.Store1.DataBind();
}

private List<job> Jobs
{
get
{
List<job> jobs = new List<job>();

for (int i = 1; i <= 50; i++)
{
jobs.Add(new Job(
i,
"Task" + i.ToString(),
DateTime.Today.AddDays(i),
DateTime.Today.AddDays(i + i),
(i%3 == 0)));
}

return jobs;
}
}

public class Job
{
public Job(int id, string name, DateTime start, DateTime end, bool completed)
{
this.ID = id;
this.Name = name;
this.Start = start;
this.End = end;
this.Completed = completed;
}

public int ID { get; set; }
public string Name { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
public bool Completed { get; set; }
}
</script>
</head>
<body>
<form id="form1" runat="server">


<ext:ResourceManager runat="server" />

<ext:Window
ID="Window1"
runat="server"
Collapsible="true"
Maximizable="true"
Icon="Lorry"
Title="Job List"
Width="600"
Height="300"
X="50"
Y="50"
CenterOnLoad="false"
Layout="Fit">
<items>
<ext:GridPanel
ID="GridPanel1"
runat="server"
StripeRows="true"
Header="false"
Border="false"
AutoExpandColumn="Name">
<store>
<ext:Store ID="Store1" runat="server">
<reader>
<ext:jsonreader idproperty="ID" xmlns:ext="#unknown">
<fields>
<ext:recordfield name="ID">
<ext:recordfield name="Name">
<ext:recordfield name="Start" type="Date">
<ext:recordfield name="End" type="Date">
<ext:recordfield name="Completed" type="Boolean">





<loadmask showmask="false">
<SelectionModel>
<ext:RowSelectionModel
ID="SelectedRowModel1"
runat="server"
SingleSelect="true"
/>
</SelectionModel>
<ColumnModel runat="server">
<columns> <ext:column xmlns:ext="#unknown">
Header="ID"
Width="40"
Sortable="true"
DataIndex="ID"
/>
<ext:column>
ColumnID="Name"
Header="Job Name"
Sortable="true"
DataIndex="Name"
/>
<ext:datecolumn>
ColumnID="Start"
Header="Start"
Width="120"
Sortable="true"
DataIndex="Start"
Format="yyyy-MM-dd"
/>
<ext:datecolumn>
ColumnID="End"
Header="End"
Width="120"
Sortable="true"
DataIndex="End"
Format="yyyy-MM-dd"
/>
<ext:column>
ColumnID="Completed"
Header="Completed"
Width="80"
Sortable="true"
DataIndex="Completed">
<renderer handler="return (value) ? 'Yes':'No';">


<plugins>
<ext:GridFilters runat="server" Local="true">
<filters>
<ext:numericfilter dataindex="ID" xmlns:ext="#unknown">
<ext:stringfilter dataindex="Name" xmlns:ext="#unknown">
<ext:datefilter dataindex="Start" xmlns:ext="#unknown">
<DatePickerOptions runat="server" TodayText="Now" />

<ext:datefilter dataindex="End" xmlns:ext="#unknown">
<DatePickerOptions runat="server" TodayText="Now" />

<ext:booleanfilter dataindex="Completed" xmlns:ext="#unknown">



<bottombar>
<ext:PagingToolbar
runat="server"
PageSize="10"
DisplayInfo="true"
DisplayMsg="Displaying Jobs {0} - {1} of {2}"
/>



Posted
Updated 24-Jul-14 9:55am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900