protected virtual void OnNavigationButtonClicked(NavigationButtonEventArgs e) { if (NavigationButtonClicked != null) { NavigationButtonClicked(e); } }
protected void btnGO_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.GoToPageButton; int iPageNo; try { iPageNo = int.Parse(txtGO.Text.ToString()); } catch (Exception ex) { iPageNo = currentPage; } if (iPageNo > totalPages) { iPageNo = int.Parse(totalPages.ToString()); } oEventArgs.PageToGo = iPageNo; txtGO.Text = totalPages.ToString(); if (IsNumeric(txtPagesize.Text) == false) { txtPagesize.Text = "20"; } PageSize = long.Parse(txtPagesize.Text.ToString()); OnNavigationButtonClicked(oEventArgs); }
protected void btnNext_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.NextRecordButton; NavigationLink("Next"); oEventArgs.PageToGo = currentPage; OnNavigationButtonClicked(oEventArgs); }
protected void btnLast_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.LastRecordButton; NavigationLink("Last"); oEventArgs.PageToGo = Convert.ToInt16(totalPages.ToString()); txtGO.Text = totalPages.ToString(); OnNavigationButtonClicked(oEventArgs); }
protected void btnFirst_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.FirstRecordButton; txtGO.Text = "1"; oEventArgs.PageToGo = 1; NavigationLink("First"); OnNavigationButtonClicked(oEventArgs); }
protected void GridView1_NavigationButtonClick(object sender, NavigationButtonEventArgs e) { if (e.NavigationButtonsType == NavigationButtonsTypes.GoFirst) { FilterToNthPage(GridView1.SearchFilters, GridView1.CurrentSortExpression, GridView1.CurrentSortDirection, 1); } else if (e.NavigationButtonsType == NavigationButtonsTypes.GoLast) { FilterToNthPage(GridView1.SearchFilters, GridView1.CurrentSortExpression, GridView1.CurrentSortDirection, GridView1.TotalSearchPages); } else if (e.NavigationButtonsType == NavigationButtonsTypes.GoNext) { if (GridView1.CurrentSearchPageNo < GridView1.TotalSearchPages) { FilterToNthPage(GridView1.SearchFilters, GridView1.CurrentSortExpression, GridView1.CurrentSortDirection, (int)GridView1.CurrentSearchPageNo + 1); } } else if (e.NavigationButtonsType == NavigationButtonsTypes.GoPrevious) { if (GridView1.CurrentSearchPageNo > 1) { FilterToNthPage(GridView1.SearchFilters, GridView1.CurrentSortExpression, GridView1.CurrentSortDirection, (int)GridView1.CurrentSearchPageNo - 1); } } else if (e.NavigationButtonsType == NavigationButtonsTypes.GoToPage) { FilterToNthPage(GridView1.SearchFilters, GridView1.CurrentSortExpression, GridView1.CurrentSortDirection, (int)e.PageIndex); } }
protected virtual void OnNavigationButtonClicked(NavigationButtonEventArgs e) { if (NavigationButtonClicked != null) { NavigationButtonClicked(e); } }
protected void btnPrev_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.PreviousRecordButton; NavigationLink("Prev"); oEventArgs.PageToGo = currentPage; OnNavigationButtonClicked(oEventArgs); }
protected void btnLast_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.LastRecordButton; NavigationLink("Last"); oEventArgs.PageToGo = Convert.ToInt16(totalPages.ToString()); txtGO.Text = totalPages.ToString(); OnNavigationButtonClicked(oEventArgs); }
protected void btnGO_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.GoToPageButton; int iPageNo; try { iPageNo = int.Parse(txtGO.Text.ToString()); } catch (Exception ex) { iPageNo = currentPage; } if(iPageNo > totalPages) { iPageNo = int.Parse(totalPages.ToString()); } oEventArgs.PageToGo = iPageNo; txtGO.Text = totalPages.ToString(); if(IsNumeric(txtPagesize.Text) == false) { txtPagesize.Text = "20"; } PageSize = long.Parse(txtPagesize.Text.ToString()); OnNavigationButtonClicked(oEventArgs); }
protected void btnFirst_Click(object sender, ImageClickEventArgs e) { NavigationButtonEventArgs oEventArgs = new NavigationButtonEventArgs(); oEventArgs.ButtonClicked = ClickedButton.FirstRecordButton; txtGO.Text = "1"; oEventArgs.PageToGo = 1; NavigationLink("First"); OnNavigationButtonClicked(oEventArgs); }