我写的方法,可以实现,看看有帮助吗 public void Setpage(Sybase.DataWindow.Web.WebDataWindowControl WebDataWindowControl1, int ai_page) { if (ai_page == 0) { ai_page = Convert.ToInt32(ConfigurationSettings.AppSettings["pageNumber"]); } WebDataWindowControl1.RowsPerPage = ai_page; // Style st = new Style(); // PageNavigationBarStyle style = new PageNavigationBarStyle(); // FontInfo ftd = new FontInfo(); // ftd.Size = 9; // //dd.Size = new FontUnit(9); // style.Font.CopyFrom(ftd); //// Font ft = new Font(); //style.Font.CopyFrom(); // //style.Font = dd; // WebDataWindowControl1.PageNavigationBarSettings.BarStyle.CopyFrom(style); WebDataWindowControl1.PageNavigationBarSettings.NextPrevNavigator.FirstPageText = "首页"; WebDataWindowControl1.PageNavigationBarSettings.NavigatorType = Sybase.DataWindow.Web.PageNavigatorType.NextPrevWithQuickGo; WebDataWindowControl1.PageNavigationBarSettings.PageStatusInfo.Visible = true; WebDataWindowControl1.PageNavigationBarSettings.PageStatusInfo.TextFormat = "总共{T}页 第 {C}页"; WebDataWindowControl1.PageNavigationBarSettings.PageStatusInfo.Position = Sybase.DataWindow.Web.PageStatusInfoPosition.Left; WebDataWindowControl1.PageNavigationBarSettings.QuickGoNavigator.Type = Sybase.DataWindow.Web.QuickGoPageNavigatorType.Edit; WebDataWindowControl1.PageNavigationBarSettings.QuickGoNavigator.GoToDescription = "跳转到:"; WebDataWindowControl1.PageNavigationBarSettings.QuickGoNavigator.GoToButtonText = "GO"; //WebDataWindowControl1.PageNavigationBarSettings.QuickGoNavigator. //WebDataWindowControl1.PagingMethod = Sybase.DataWindow.Web.PagingMethod.Callback; WebDataWindowControl1.PageNavigationBarSettings.NextPrevNavigator.FirstPageText = "首页"; WebDataWindowControl1.PageNavigationBarSettings.NextPrevNavigator.LastPageText = "末页"; WebDataWindowControl1.PageNavigationBarSettings.NextPrevNavigator.NextPageText = "下一页"; WebDataWindowControl1.PageNavigationBarSettings.NextPrevNavigator.PrevPageText = "前一页"; WebDataWindowControl1.PageNavigationBarSettings.Visible = true; } |