What is the wrong with this code? I simply want to show data from a datatable I have just made in a datagidview. The code runs well but doesn't show the data. NB: the code written in c++ winforms 2022 The code:
DataTable ^dt = gcnew DataTable();
dt->Columns->Add("Name");
dt->Columns->Add("Surname");
dt->Columns->Add("Address");
dt->Columns->Add("Phone");
DataRow^ datarow = dt->NewRow();
datarow\["Name"\] =
"Ahmad";
datarow["Surname"] = "Hassan";
datarow["Address"] = "Cairo";
datarow["Phone"] = "0987654321";
dt->Rows->Add(datarow);
dataGridView1->DataSource = dt;