Nov 12, 2008, 11:54 AM
[CLOSED] Wrong response when trying to use an ObjectDataSource
Hello,
first of all I want to greet everybody as this is my first post. And I also want to congratulate you on this great library.
So, what I am trying to do is the following:
Simple ext:GridPanel getting data from an ObjectDataSource (I must say this is my first proper test).
This is the ASP code:
The AJAX call is triggered but the information I get back is empty.
My question is: what type should the data method return so that it is readable by the ext:Store object?
first of all I want to greet everybody as this is my first post. And I also want to congratulate you on this great library.
So, what I am trying to do is the following:
Simple ext:GridPanel getting data from an ObjectDataSource (I must say this is my first proper test).
This is the ASP code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetGroups" TypeName="Group" OnSelected="ObjectDataSource1_Selected">
<SelectParameters>
<asp:Parameter Name="start" Type="Int32" />
<asp:Parameter Name="limit" Type="Int32" />
<asp:Parameter Name="sort" />
<asp:Parameter Name="dir" />
<asp:Parameter Name="count" Direction="Output" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<ext:Store ID="Store1" runat="server" AutoLoad="true" RemoteSort="true" DataSourceID="ObjectDataSource1" OnRefreshData="Store1_RefreshData">
<AutoLoadParams>
<ext:Parameter Name="start" Value="={0}" />
<ext:Parameter Name="limit" Value="={3}" />
</AutoLoadParams>
<Proxy>
<ext:DataSourceProxy />
</Proxy>
<Reader>
<ext:JsonReader ReaderID="ID">
<Fields>
<ext:RecordField Name="Name" />
<ext:RecordField Name="Status" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:GridPanel
ID="GridPanel1"
runat="server"
AutoExpandColumn="Name"
StoreID="Store1"
Border="false">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="Name" DataIndex="Name" Header="Name" />
<ext:Column ColumnID="Status" DataIndex="Status" Header="Status" />
</Columns>
</ColumnModel>
<BottomBar>
<ext:PagingToolBar
ID="PagingToolBar1"
runat="server"
PageSize="10"
StoreID="Store1"
/>
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>
and Group.GetGroups is a static method.The AJAX call is triggered but the information I get back is empty.
My question is: what type should the data method return so that it is readable by the ext:Store object?