How do I insert a value from a string into a dataGridView?
What I'm trying to do is to display a string from a 2D array who is returned by a method.
struct t_thing {
std::string strings[3][3];
};
struct t_thing array = methodWith2DArrayStringReturn();
int index = dataGridView1->Rows->Add();
dataGridView1->Rows[index]->Cells[1]->Value = array.strings[0][0];
Error: E1767 function"System::Windows::Forms::BindingSource::DataSource::set" cannot be called with the given argument list CppCLR_WinForms_GUI argument types are: (std::string [20][3]).
object type is: System::Windows::Forms::BindingSource ^
I know the following works:
int index = dataGridView1->Rows->Add();
dataGridView1->Rows[index]->Cells[1]->Value = "word";