i am trying to display on a Windomws forms a datagridview. (for sudoku) my source is a table of integer.
i am using datasource but nothing displaying when i run.
public Form1()
{
InitializeComponent();
int[,] my_table = new int[9, 9] {
{ 2,1,8,3,5,7,6,4,9},
{ 5,7,3,4,9,6,8,2,1},
{ 6,9,4,1,8,2,3,5,7},
{ 1,6,9,5,2,8,4,7,3},
{ 3,5,2,9,7,4,1,8,6},
{ 4,8,7,6,1,3,2,9,5},
{ 7,3,5,2,4,1,9,6,8},
{ 8,2,1,7,6,9,5,3,4},
{ 9,4,6,8,3,5,7,1,2}
};
dataGridView1.DataSource = my_table.ToString();
dataGridView1.Refresh();
dataGridView1.Invalidate();
}
my result is a grey square.
could you help me please ?
PS : sorry for my english, i'm french