Reputation: 75
Hello! I have question: textbox text multiline contains values: Samaccountname1 Samaccountname2 Samaccountname3 etc... dataGridView Row Cells[0] contain the same values but they are located in a different order: Samaccountname2 Samaccountname1 Samaccountname3
Could you tell (if it possible) how to sort the values in a dataGridView Row Cells[0] so that they were in the same order that textbox.lines[i]? dataGridView moved to the form from the Toolbox (not created programmatically). There is such data:
Upvotes: 0
Views: 137
Reputation: 29
If you use the first column in the dataGridView (because using just cells[0]) , try this code may help you :
dataGridView1.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
Upvotes: 1