I can not reappear the bugs in English datas.So I give you example with Chinese datas.
Please pay attiton for the first page's group name and the second page's group name.
In the first page,there is only one group named "陈晓慧".
And in the second page,there are two group named "陈晓慧" and "段芳莉". "段芳莉" is in front of "陈晓慧", But in my opinion, I thinke the correct order is "陈晓慧" in front of "段芳莉".
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserAdmin.aspx.cs" Inherits="CQU.Net.UserCenter.pages.User.UserAdmin" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
var store = this.GridPanel1.GetStore();
int i = 100;
store.DataSource = getUsers();
store.DataBind();
}
protected void StoreUser_Refresh(object sender, StoreRefreshDataEventArgs e)
{
int start = e.Start;
if (start < 0)
start = 0;
int limit = e.Limit;
if (limit < 0)
limit = PagingToolbar1.PageSize;
var query = getUsers();
var users = query.Skip(start).Take(limit);
var store = this.GridPanel1.GetStore();
(store.Proxy[0] as PageProxy).Total = query.Count;
store.DataSource = users;
store.DataBind();
}
public List<User> getUsers()
{
int i = 100;
return new List<User>
{
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "陈晓慧"),
new User(i++, "a", "段芳莉"),
new User(i++, "a", "段芳莉"),
new User(i++, "a", "段芳莉"),
new User(i++, "a", "段芳莉"),
new User(i++, "a", "段芳莉")
};
}
public class User
{
public User(int userId, string LoginName, string teamName)
{
this.userId = userId;
this.LoginName = LoginName;
this.teamName = teamName;
}
public int userId { get; set; }
public string LoginName { get; set; }
public string teamName { 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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="ViewPort1" runat="server">
<Items>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<Center MarginsSummary="0 5 5 5">
<ext:Panel ID="Panel1" runat="server" Title="User" Icon="Lorry" Width="400" Layout="Fit">
<Items>
<ext:GridPanel ID="GridPanel1" runat="server" StripeRows="true"
Icon="ApplicationViewColumns" TrackMouseOver="false">
<Store>
<ext:Store ID="StoreUser" SerializationMode="Complex" runat="server" SkipIdForNewRecords="false"
RemoteSort="false" RefreshAfterSaving="None"
OnRefreshData="StoreUser_Refresh"
WarningOnDirty="false" GroupField="teamName" GroupDir="ASC">
<Proxy>
<ext:PageProxy />
</Proxy>
<Reader>
<ext:JsonReader IDProperty="userId">
<Fields>
<ext:RecordField Name="LoginName" />
<ext:RecordField Name="teamName" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn Width="30" />
<ext:Column DataIndex="teamName" Header="team">
</ext:Column>
<ext:Column ColumnID="LoginName" DataIndex="LoginName" Header="Name">
</ext:Column>
</Columns>
</ColumnModel>
<View>
<ext:GroupingView ID="GroupingView1" runat="server" ForceFit="true" MarkDirty="false"
ShowGroupName="false" EnableNoGroups="true" HideGroupedColumn="true" />
</View>
<LoadMask ShowMask="true" />
<SaveMask ShowMask="true" />
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="10" />
</BottomBar>
</ext:GridPanel>
</Items>
</ext:Panel>
</Center>
</ext:BorderLayout>
</Items>
</ext:Viewport>
</form>
</body>
</html>