I try to display data in the DataGridView in C# but it can't show anything at all. My DataGridView is inside a private static void function.
private static void processsub(Event a , Session session)
{
List<String[]> lista = new List<string[]>();
lista.add(new string[] {text1, text2, text3, text4, text5, text6, text7 });
Form1 frm1 = newForm1();
frm1.dataGridView1.AutoGenerateColumns=true;
DataTable table = ConvertListtoDatTable(lista);
frm1.dataGridview1.DataSource = table;
}
I used the messagebox window to display the " .Row[0].Cell[0].Value.ToString()" and it shows the right value but the DataGridView just didn't display the data.
Anyone have any suggestion?
