PDA

View Full Version : [CLOSED] no PageSize property in the PagingToolbar on the BottomBar ?



hdsoso
Sep 01, 2013, 1:01 PM
I see exmple.ext.net , there is PageSize property, why not in my project ,
my ext.net version is 2.2.0.37643

test case :


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="extdemo.WebForm3" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
store1.DataSource = new object[]
{
new object[]{"1","user1","1"},
new object[]{"2","user1","2"},
new object[]{"3","user1","1"},
};
}

}
protected void RenderTeacher(object sender, DirectEventArgs e)
{
X.Msg.Alert("sss", "ssss").Show();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server"></ext:ResourceManager>
<ext:GridPanel runat="server">
<Store>
<ext:Store runat="server" ID="store1">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="id"></ext:ModelField>
<ext:ModelField Name="student_name"></ext:ModelField>
<ext:ModelField Name="teacher_id"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" DataIndex="id" Text="id"></ext:Column>
<ext:Column ID="Column2" runat="server" DataIndex="student_name" Text="student's name"></ext:Column>
<ext:Column ID="Column3" runat="server" DataIndex="teacher_id" Text="teacher's name">
<DirectEvents>
<Render OnEvent="RenderTeacher">
<ExtraParams>
<ext:Parameter Name="tid" Value="record.data.teacher_id" Mode="Raw" />
</ExtraParams>
</Render>
</DirectEvents>
</ext:Column>
</Columns>

</ColumnModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server">
</ext:PagingToolbar>
</BottomBar>
</ext:GridPanel>
</form>
</body>
</html>

santosh
Sep 01, 2013, 3:29 PM
Hi,

In ext.net version is 2.2.0.37643,they have mentioned 'PageSize' property to the Store. Not for the PagingToolbar in Grid Panel.

Like,


<ext:Store runat="server" ID="store1" PageSize="20" >
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="id"></ext:ModelField>
<ext:ModelField Name="student_name"></ext:ModelField>
<ext:ModelField Name="teacher_id"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>



Thanks
Santosh