This message was discovered on ASPFriends.com 'aspngescalate' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| Rick Kolesar |
-- Moved from [aspngwebcontrols] to [aspngescalate] by Click here to reveal e-mail address --Listmaster - Please post to webcontrols list, as it is really about the operation of the DataGrid Web control. You moved it to the data list before and I haven't had a response.Thanks====================================================================Has anyone else noticed a problem with the behavior of paging a DataGridwhen the PagerStyle Mode is set to Numeric Pages and you have a large numberof pages?If you use the next "..." buttons to move forward more than two sets ofpages, the previous "..." buttons no longer function, they don't repositionthe grid back.Here's my Grid: (followed by the Codebehind snippet)==================<asp:DataGrid id=dg runat="server" ForeColor="Black"AutoGenerateColumns="False"ShowFooter="True"AllowPaging="True" PageSize="20"OnPageIndexChanged="OnGridPageIndexChanged"AllowSorting="True"OnSortCommand="dg_Sort"OnEditCommand="dg_Edit"OnCancelCommand="dg_Cancel"OnUpdateCommand="dg_Update"OnDeleteCommand="dg_Delete"OnItemCreated="dg_ItemCreated"><Columns> <asp:BoundColumn HeaderText="Market Id" DataField="Id" SortExpression="Id"> <HeaderStyle Width=100px /> </asp:BoundColumn> <asp:BoundColumn HeaderText="Name" DataField="Name" SortExpression="Name"> <HeaderStyle Width=250px /> </asp:BoundColumn> <asp:BoundColumn HeaderText="Mgr Id" DataField="ManagerId"SortExpression="Name"> <HeaderStyle Width=100px /> </asp:BoundColumn> <asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="OK" ItemStyle-Wrap="false" HeaderStyle-Wrap="false" > <HeaderStyle Width=40px /> </asp:EditCommandColumn> <asp:ButtonColumn HeaderText="" ButtonType="LinkButton" Text="Delete"CommandName="Delete"> <HeaderStyle Width=55px /> </asp:ButtonColumn></Columns><PagerStyle ForeColor="white" BackColor="Green" Font-Size="10pt"Font-Bold="True"Position="top" HorizontalAlign="left" PageButtonCount="10"Mode="NumericPages" /><HeaderStyle Font-Bold="True" ForeColor="White" BackColor="Green" /><FooterStyle ForeColor="white" BackColor="green" /><ItemStyle Font-Size="10pt" Font-Names="Verdana" Font-Bold="True"BackColor="PapayaWhip" /><AlternatingItemStyle BorderColor="Transparent" BackColor="LightGreen" /><SelectedItemStyle BorderColor="Transparent" BackColor="white" /></asp:DataGrid>=========================protected void OnGridPageIndexChanged( object sender,DataGridPageChangedEventArgs e ){ dg.CurrentPageIndex = e.NewPageIndex; FillGrid( SortExpression );}private void FillGrid( string sKey ){ string sLang = Session["UserLanguageId"].ToString(); int iCount = 0; DataSet ds = new DataSet(); Oram oOram = new Oram(); oOram.GetMarkets( sLang, Session["OrganizationId"].ToString(), Session["RegionId"].ToString(), Session["AreaId"].ToString(), ds, refiCount ); ViewState["iCount"] = iCount; // save for later display DataView dv = new DataView( ds.Tables["myTable"] ); string sort = SortExpression; if ( SortAscending == false ) { sort += " desc"; } dv.Sort = sort; dg.DataSource = dv; dg.DataBind();}_________________________________________________________________Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|
|
| |
| |
| Charles M. Carroll (VIP) |
At 02:22 PM 8/29/2001 -0700, you wrote: [Original message clipped]
The [aspngwebcontrols] list is only for notebook tab, tree, toolbar and multi-page controls. It has nothing to do with Data controls. The rules @ http://www.asplists.com/asplists/aspngescalate.asp?Tab=rules shows an elegant way to get unanswered questions answered.
|
|
| |
|
|
|
|
|