VBobCat
Well-known member
My Form has two data-unbound datagridviews, with the same structure, differing only about which columns are visible.
It aims to allow user to select persons from the first one, and add them to the second one.
In this second datagridview, some settings are to be made about each person, hence it shows some checkbox and combobox columns that remain invisible in the first one.
It works fine, except for a detail. User can sort persons by name in both datagridviews, and that is useful.
But I noticed that if user adds some persons to the second datagridview, then sort it by the name column, and then add some persons more, these enter at the bottom of the list of second datagridview, naturally out of alphabetical order (and that is ok), but still it shows the sort mark on top of the name column, which is misleading.
My main question is this: How to clear the sort mark upon insertion of a new of second datagridviewrow? I've tried MyDataGridView.Sort(Nothing) but it raises an error.
A second, unrelated and maybe simpler question: How can I scroll down the second datagridview that has already more rows than it can show, so that the newly inserted row gets visible just after it is inserted?
Thank you very much!
It aims to allow user to select persons from the first one, and add them to the second one.
In this second datagridview, some settings are to be made about each person, hence it shows some checkbox and combobox columns that remain invisible in the first one.
It works fine, except for a detail. User can sort persons by name in both datagridviews, and that is useful.
But I noticed that if user adds some persons to the second datagridview, then sort it by the name column, and then add some persons more, these enter at the bottom of the list of second datagridview, naturally out of alphabetical order (and that is ok), but still it shows the sort mark on top of the name column, which is misleading.
My main question is this: How to clear the sort mark upon insertion of a new of second datagridviewrow? I've tried MyDataGridView.Sort(Nothing) but it raises an error.
A second, unrelated and maybe simpler question: How can I scroll down the second datagridview that has already more rows than it can show, so that the newly inserted row gets visible just after it is inserted?
Thank you very much!