protected void CurrentRowTextBox_OnTextChanged(object sender, EventArgs e) { TextBox t = (TextBox)sender; try { DataPagertxtValue = Convert.ToInt32(t.Text); } catch { LoggedIn master = (LoggedIn)this.Master; master.ShowMessage("Value Out of Range", false); return; } if (t.Text == "") { return; } if (DataPagertxtValue <= MyQuestDataPager.TotalRowCount && DataPagertxtValue > 0) { MyQuestDataPager.SetPageProperties(Convert.ToInt32(t.Text) - 1, MyQuestDataPager.PageSize, true); bindLVQuest(); recalcNoOfPages(); } else { LoggedIn master = (LoggedIn)this.Master; master.ShowMessage("Incorrect Input", false); } }
protected void PageJump_SelectedIndexChanged(object sender, System.EventArgs e) { DropDownList PageJumpDDL = (DropDownList)sender; int pageNo = Convert.ToInt32(PageJumpDDL.SelectedValue); int startRowIndex = (pageNo - 1) * MyQuestDataPager.PageSize; MyQuestDataPager.SetPageProperties(startRowIndex, MyQuestDataPager.PageSize, true); recalcNoOfPages(); }
public void LatestData() { int totalRecords = MyQuestDataPager.TotalRowCount; int recordperpage = Convert.ToInt32(MyQuestDataPager.PageSize); if (totalRecords > recordperpage) { if (totalRecords - recordperpage > recordperpage) { MyQuestDataPager.SetPageProperties((totalRecords - recordperpage), MyQuestDataPager.MaximumRows, true); } else { MyQuestDataPager.SetPageProperties(recordperpage, MyQuestDataPager.MaximumRows, true); } } }