Author: husted Date: Wed Dec 6 12:38:52 2006 New Revision: 483214 URL: http://svn.apache.org/viewvc?view=rev&rev=483214 Log: Extend support for flipping to a page in the datagrid, based on a key field. Clients can override ExecuteList to specify the name of the key field.
Modified: struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs Modified: struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs?view=diff&rev=483214&r1=483213&r2=483214 ============================================================================== --- struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs (original) +++ struts/sandbox/trunk/overdrive/Nexus/Web/GridControl.ascx.cs Wed Dec 6 12:38:52 2006 @@ -650,9 +650,11 @@ // Check custom page settings if (AllowCustomPaging) { - count = GetItemCount(helper); grid.AllowCustomPaging = true; + count = GetItemCount(helper); grid.VirtualItemCount = count; + int page = GetItemPage(helper); + if (page!=0) grid.CurrentPageIndex = page; } BindColumns(i); } @@ -1264,7 +1266,6 @@ a.ItemFrom = from; a.ItemThru = thru; a.ItemCount = count; - Grid.CurrentPageIndex = page; ListPageIndexChanged(sender, a); } }