title: How to change specific column data in the datatable according to some condition
body: <p>I have the following case :</p>
  
  <p>I add row by row to <code>Datatable dtItems</code> according to the user data entry through a button .</p>
  
  <p>One of the columns in my data table is <code>Hours</code> , and i wanna to achieve the following conditions :</p>
  
  <ul>
  <li>1- for each user the total hours is less than or equal 5.</li>
  <li><p>2- the default :if the user enter one row then hours = 5</p>
  
  <p>if he enters two rows then make the first one 4 and the second one is 1</p>
  
  <p>if he enters three rows then make the first one is 3 and the second is 1 and the third is 1.</p>
  
  <p>etc.</p></li>
  <li>3-the maximum number of rows for each user is 5.</li>
  </ul>
  
  <p>LIKE this:</p>
  
  <p>user_id  |    name  |     hours</p>
  
  <hr>
  
  <p>323    |     jo   |    3</p>
  
  <p>323    |     jo   |    1</p>
  
  <p>323    |     jo   |    1</p>
  
  <p>324    |     jack |    4</p>
  
  <p>324    |     jack |    1</p>
  
  <hr>
  
  <pre><code>DataTable dtItems = GetDataTable();
  DataRow dr = dtItems.NewRow();
  dr["emp_num"] = txt_EmpNum.Text.Trim();
  dr["name"] = txt_EmpName.Text.Trim();
  dr["hours"] = 5;
  dtItems.Rows.Add(dr);
  
  GV_Employee.DataSource = dtItems;
  GV_Employee.DataBind();
  
  Session["ItemDT"] = dtItems;
  </code></pre>