incorrect sorting in dataGridView
-
Hello there I've put dataGridView control on the Form and i've written this code:
private void Form1_Load(object sender, EventArgs e) { dataGridView1.Columns.Add("Main", "Main"); dataGridView1.Rows.Add(3); dataGridView1[0, 0].Value = "A"; dataGridView1[0, 1].Value = "B"; dataGridView1[0, 2].Value = "F"; dataGridView1[0, 3].Value = "ABC"; }
So, when i try to sort it (clicking on the header of the table) - the last row ("ABC") is every time the last:confused:You can go a long way with a smile. You can go a lot farther with a smile and a gun. (C) Al Capone
-
Hello there I've put dataGridView control on the Form and i've written this code:
private void Form1_Load(object sender, EventArgs e) { dataGridView1.Columns.Add("Main", "Main"); dataGridView1.Rows.Add(3); dataGridView1[0, 0].Value = "A"; dataGridView1[0, 1].Value = "B"; dataGridView1[0, 2].Value = "F"; dataGridView1[0, 3].Value = "ABC"; }
So, when i try to sort it (clicking on the header of the table) - the last row ("ABC") is every time the last:confused:You can go a long way with a smile. You can go a lot farther with a smile and a gun. (C) Al Capone