PDA

View Full Version : [CLOSED] Troubles with the presentation of a value in the "rownum" column



opendat2000
Mar 31, 2014, 4:44 PM
Hi Team.

I'm having troubles with the presentation of a value in the "rownum" column associated to the control "GridPanel

Setp 1: Click in the column "Company".
Step 2: Change the page size to 2.
Step 3: Click on the next page botton. the column value "rownum" is incorrect.





<%@ Page Language="C#"%>

<%@ Import Namespace="System.Collections.Generic" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
this.BindData();
}
}

protected void MyData_Refresh(object sender, StoreReadDataEventArgs e)
{
this.BindData();
}

private void BindData()
{
Store store = this.GridPanel1.GetStore();

store.DataSource = this.Data;
store.DataBind();
}

private object[] Data
{
get
{
DateTime now = DateTime.Now;

return new object[]
{
new object[] { "3m Co", 71.72, 0.02, 0.03, now },
new object[] { "Alcoa Inc", 29.01, 0.42, 1.47, now },
new object[] { "Altria Group Inc", 83.81, 0.28, 0.34, now },
new object[] { "American Express Company", 52.55, 0.01, 0.02, now },
new object[] { "American International Group, Inc.", 64.13, 0.31, 0.49, now },
new object[] { "AT&T Inc.", 31.61, -0.48, -1.54, now },
new object[] { "Boeing Co.", 75.43, 0.53, 0.71, now },
new object[] { "Caterpillar Inc.", 67.27, 0.92, 1.39, now },
};
}
}
</script>

<!DOCTYPE html>

<html>
<head id="Head1" runat="server">
<title>Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />

<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="Array Grid"
Width="700">
<Store>
<ext:Store ID="Store1" runat="server" OnReadData="MyData_Refresh" PageSize="10">
<Model>
<ext:Model ID="Model1" runat="server">
<Fields>
<ext:ModelField Name="company" />
<ext:ModelField Name="price" Type="Float" />
<ext:ModelField Name="change" Type="Float" />
<ext:ModelField Name="pctChange" Type="Float" />
<ext:ModelField Name="lastChange" Type="Date" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="company" Direction="ASC" />
</Sorters>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="35" />
<ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Flex="1" />
<ext:Column ID="Column2" runat="server" Text="Price" Width="75" DataIndex="price" />
<ext:Column ID="Column3" runat="server" Text="Change" Width="75" DataIndex="change" />
<ext:Column ID="Column4" runat="server" Text="Change" Width="75" DataIndex="pctChange" />
<ext:DateColumn ID="DateColumn1" runat="server" Text="Last Updated" Width="85" DataIndex="lastChange" Format="H:mm:ss" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Multi" />
</SelectionModel>
<View>
<ext:GridView ID="GridView1" runat="server" StripeRows="true" />
</View>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server">
<Items>
<ext:Label ID="Label1" runat="server" Text="Page size:" />
<ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
<ext:ComboBox ID="ComboBox1" runat="server" Width="80">
<Items>
<ext:ListItem Text="1" />
<ext:ListItem Text="2" />
<ext:ListItem Text="5" />
<ext:ListItem Text="10" />
</Items>
<SelectedItems>
<ext:ListItem Value="10" />
</SelectedItems>
<Listeners>
<Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
</Listeners>
</ext:ComboBox>
</Items>
<Plugins>
<ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
</Plugins>
</ext:PagingToolbar>
</BottomBar>
<TopBar>
</TopBar>
</ext:GridPanel>
</form>
</body>
</html>




I'll be waiting your responses.

Daniil
Apr 01, 2014, 3:07 AM
Hi @opendat2000,

Thank you for the report and test case. We are investigating.

Vladimir
Apr 02, 2014, 4:04 AM
Fixed in SVN, please update and retest

opendat2000
Apr 02, 2014, 3:02 PM
Sorry, Could you please tell me the specific solution ? or where I can update the problem?

thanks.

Daniil
Apr 02, 2014, 3:18 PM
Please update from the SVN trunk. The fix is committed in the revision #5744.

opendat2000
Apr 02, 2014, 4:22 PM
Hi Daniil

My account has no permissions and/or privileges... for log in at SVN truck #5744

Location v2.x : http://svn.ext.net/premium/trunk/

premium - Revision 5745: /trunk

..
Ext.Net/
Ext.Net.Examples/
Ext.Net.Examples.MVC/
Ext.Net.vs2008.sln
Ext.Net.vs2010.sln
Ext.Net.vs2012.sln
Ext.Net.vs2013.sln
packages/

Location v1.x : http://svn.ext.net/premium/branches/1/

premium - Revision 5745: /branches/1

..
Ext.Net/
Ext.Net.API/
Ext.Net.API.Parser/
Ext.Net.ERB/
Ext.Net.Examples/
Ext.Net.MVC/
Ext.Net.Meta/
Ext.Net.Meta.Factory/
Ext.Net.Meta.Parser/
Ext.Net.Sandbox/
Ext.Net.UX/
Ext.Net.vs2008.sln
Ext.Net.vs2010.sln
Ext.Net.vs2012.sln
packages/

Thanks

Daniil
Apr 02, 2014, 4:35 PM
Any premium member has permission to access our SVN. But the credentials are not the same as the forum ones.

The SVN credentials should be emailed to you when you bought a Premium Support Subscription. Please check the inbox. If you cannot find, please send a request to support@object.net (write your forum name in a email, please).

opendat2000
Apr 02, 2014, 6:45 PM
Hi Daniil

As a premium member I can access to your SVN, but when I enter in the website, I only see the follow information:

premium - Revision 5745: /trunk

..
Ext.Net/
Ext.Net.Examples/
Ext.Net.Examples.MVC/
Ext.Net.vs2008.sln
Ext.Net.vs2010.sln
Ext.Net.vs2012.sln
Ext.Net.vs2013.sln
packages/

According to your comments "The fix is committed in the revision #5744", How can I enter to the 5744 ??

Thanks

Daniil
Apr 03, 2014, 3:46 AM
You are going to use some SVN client. I and my colleagues use TortoiseSVN.
http://tortoisesvn.net/

This program allows to see an SVN log.

opendat2000
Apr 03, 2014, 2:42 PM
Daniil thank you very much for your support and understanding.

Topic closed.

Saludos.
Mauricio.