//fungsi: Refresh GridView protected void btnRefresh_Click(object sender, EventArgs e) { if (Page.IsValid) { GvDataMurni.DataBind(); } }
protected void txtHalaman_TextChanged(object sender, EventArgs e) { GridViewRow rowPager = GvDataMurni.BottomPagerRow; TextBox txtHalaman = (TextBox)(rowPager.Cells[0].FindControl("txtHalaman")); try { if (int.Parse(txtHalaman.Text) <= GvDataMurni.PageCount + 1 && int.Parse(txtHalaman.Text) > 0) { GvDataMurni.PageIndex = (int.Parse(txtHalaman.Text)) - 1; GvDataMurni.DataBind(); } } catch (Exception) { txtHalaman.Text = (GvDataMurni.PageIndex + 1).ToString(); } }