My code; All i wanted is to copy the format that was done on the richbox on the right and implement it in a datagridview, can somebody give me a hand? The DGV on the bottom should have only 1 column which is named "Notifcation" and below it are the example data to be found in the richtextbox.
Or a new way to discharge unnecessary blank row in the first DGV? and put them all together in one column same as the presentation of the richtextbox?
DataTable dt_new = new DataTable();
dt_new.Merge(dt1, true, MissingSchemaAction.Add);
dt_new.Merge(dt2, true, MissingSchemaAction.Add);
dt_new.Merge(dt3, true, MissingSchemaAction.Add);
dgv4.DataSource = dt_new;
String a = dt1.Rows.Count.ToString();
String s = dt2.Rows.Count.ToString();
String d = dt3.Rows.Count.ToString();
int z = Int32.Parse(a);
int x = Int32.Parse(s);
int c = Int32.Parse(d);
int sum = z + x + c;
CANT.Text = sum.ToString();
//richtextbox
for (int i = 0; i < dgv4.Rows.Count - 1; i++)
{
richTextBox1.Text = richTextBox1.Text;
for (int j = 0; j < dgv4.Columns.Count; j++)
{
richTextBox1.Text = richTextBox1.Text + dgv4.Rows[i].Cells[j].Value.ToString();
}
richTextBox1.Text = richTextBox1.Text + "\n";
}`