I fill the dataGrid by binding a dataSet to the grid, with aDataGridView.dataSource = aDataSet.aTableName, when I trace the code after using this function, all of the column indexes are reset to 0, what can I do? how can I find new real indexes? can I use a different function?
I tried this code I found here, but it's not working: this.dataGridView1.DataSource = null; this.dataGridView1.Columns.Clear(); this.dataGridView1.DataSource = data;
Set dataGridView1.AutoGenerateColumns = false; before assigning the DataSource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With