'Replace DataReader data

I'm working on a ASP.Net Web Forms Application.Currently SqlDataReaders directly bind to the two grid views. I need to change the data set before binding it to the grid view .There are two datasets coming from Stored Procedure (Two select Queries). I need to edit both of them and replace some data before binding to grids .What is the best way to achieve this.?

private void BindTable()
{
    LiteralMessage.Text = "";
    RecentLiteralMessage.Text = "";
    ErrorLiteralMessege.Text = "";
    var isStandbySelected = SelectedDatabase.SelectedValue == "stats";
    using (var db = new Database(isStandbySelected))
    {
        try
        {
            
            //db.BeginTransaction(IsolationLevel.Snapshot);
            db.BeginTransaction(); //Need a transaction block to stop from closing connection
            db.StoredProcedure = "dbo.NewExportList";
            if (!string.IsNullOrEmpty(TextBoxNameFilter.Text))
                db.AddParameter("@nameFilter", TextBoxNameFilter.Text);
            db.AddParameter("@excludedExports", CheckBoxExcludedExports.Checked);
            db.AddParameter("@RunOnReportingServer", SelectedDatabase.SelectedValue == "stats" );
            if(CheckBoxRecentlyRun.Checked)
                db.AddParameter("@recentExports", true);

            System.Data.SqlClient.SqlDataReader reader = db.GetDataReader();
            GridViewExports.DataSource = reader;

            GridViewExports.DataBind();
            if (GridViewExports.Rows.Count > 0)
            {
                GridViewExports.Visible = true;
            }
            else
            {
                GridViewExports.Visible = false;
                LiteralMessage.Text = "No Results";
            }
             
    
            GridViewRecentExports.DataSource = null; //clear any exsisting data

            if (reader.NextResult()) //Get the second data set if any
            {
                GridViewRecentExports.DataSource = reader;                        
            }

            GridViewRecentExports.DataBind();

            if (GridViewRecentExports.Rows.Count > 0)
            {
                GridViewRecentExports.Visible = true;
            }
            else
            {
                GridViewRecentExports.Visible = false;
                RecentLiteralMessage.Text = "No Results";
            }
            db.CloseConnection();
            //db.CommitTransaction();
        }
        catch (Exception ex)
        {
      
        }
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source