title: How to add row in datagridview from another form?
body: <p>i have 2 forms. form1 contains the datagridview. the second(form2) form contains textboxs. when i click Ok button in form2, the values should get added in datagridview as new row. This is the code i am trying to use to pass the data,but its neither showing error nor result.</p>
  
  <p>Form2</p>
  
  <pre><code>private void btnOk_Click(object sender, EventArgs e)
  { 
    form1.datagridview.Rows.Add("firstname", "lastname", "Success", "Userid", DateTime.Now.ToString());
  }
  </code></pre>