void RetentionGridView_PagerCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Contains("Page")) { CffGenGridView xGrid = sender as CffGenGridView; int selectedRowIndex = xGrid.PageSize * (xGrid.PageIndex); RetentionGridView.FocusedRowIndex = selectedRowIndex; RetentionGridView.SelectRow(selectedRowIndex); showRetentionGridView = false; LoadSelectedRetention(selectedRowIndex); //string script = "hideRetentionGridView();"; //dbb string script = "showRetentionGridView();"; ScriptManager.RegisterStartupScript(this, GetType(), "hideRetGrid", script, true); } }