title: Change GridView Column Value in C#
body: <p>I have a GridView which has one column Status, which has default value False(in a label) in each Row. 
  There is one Column named as Student, this is link button. So when User clicks on Student name<br>
  a gridview opens for to display data for that User. I change data for second GridView and then save it. So When this data is successfully saved. I want to modify the Status of 1st GridView from False to True for that particular row.
  So please suggest me how to do it?
  Is it necessary to bind the GridView again. IS there any easy method, please let me know. </p>
  
  <p>So the main problem is how to modify a particular cell value in a GridView, based on some some action. </p>
  
  <p>I'm writing the piece of Code, which I'm trying.
  I 'm saving the Parent GridView Row no. is ViewState.</p>
  
  <pre><code>protected void btnSave_Click(object sender, EventArgs e)
  {
      if (ViewState["RowIndexPOS"] != null)
      {
          int iRowIndex = Convert.ToInt32(ViewState["RowIndexPOS"]);
          Label lblStatus = (Label)GridViewMultiplePOSAssociationId.Rows[iRowIndex].FindControl("LabelStatusPendingPOSId");
          //Means all rows in GridView are successfully associated
          if (table.Rows.Count == iResultCount)
          {
              lblStatus.Text = "Associated";
          }
          else
          {
              lblStatus.Text = "Pending";
          }
      }
  }
  </code></pre>
  
  <p>Code to bind first gridview</p>
  
  <pre><code>DataTable dt = new DataTable();
  DataRow dr = null;
  dt.Columns.Add(new DataColumn("Row Number", typeof(string)));
  dt.Columns.Add(new DataColumn("POS Id", typeof(string)));
  dt.Columns.Add(new DataColumn("Action", typeof(string)));
  dt.Columns.Add(new DataColumn("Status", typeof(string)));
  for (int index = 0; index &lt; m_listStrPendingListOfPOS.Count; index++)
  {
      dr = dt.NewRow();
      int iRowNo = index + 1;
      dr["Row Number"] = iRowNo;
      string strGridViewPOSId = m_listStrPendingListOfPOS[index];
      dr["POS Id"] = strGridViewPOSId;
      dr["Action"] = string.Empty;
      dr["Status"] = "Pending";
      dt.Rows.Add(dr);                                            
  }
  
  ViewState["POSTable"] = dt;
  GridViewMultiplePOSAssociationId.DataSource = dt;
  GridViewMultiplePOSAssociationId.DataBind();  
  </code></pre>
  
  <p>When I'm trying this. Status column is Empty in each Row. After setting this to Associated.</p>