protected void RequestDetailsGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { int requestID = (int)ViewState["rid"]; RequestDetailsGridView.DataSource = RequestBizLogic.ListRequestDetails(requestID); RequestDetailsGridView.PageIndex = e.NewPageIndex; RequestDetailsGridView.DataBind(); }
protected void RequestGridView_SelectedIndexChanged(object sender, EventArgs e) { int RequestID = (int)RequestGridView.SelectedDataKey.Value; ViewState["rid"] = (int)RequestID; RequestDetailsGridView.Visible = true; RequestDetailsGridView.DataSource = RequestBizLogic.ListRequestDetails(RequestID); RequestDetailsGridView.DataBind(); }
protected void RequestGridView_SelectedIndexChanged(object sender, EventArgs e) { //find which requestID has been clicked int RequestID = (int)RequestGridView.SelectedDataKey.Value; ViewState["rid"] = (int)RequestID; RequestDetailsGridView.Visible = true; RequestDetailsGridView.DataSource = RequestBizLogic.ListRequestDetails(RequestID); RequestDetailsGridView.DataBind(); if (StatusRadioButtonList.SelectedValue == "Approved" || StatusRadioButtonList.SelectedValue == "Rejected") { RejectButton.Visible = false; ApproveButton.Visible = false; } else if (StatusRadioButtonList.SelectedValue == "Pending") { RejectButton.Visible = true; ApproveButton.Visible = true; RemarksTextBox.Visible = true; Label3.Visible = true; } }