A
AlexS
I have form with one of tabpages having 2 listboxes and 2 combo boxes.
I load them using DataSource property in initializer - by default. I just
assign DataViews, which are built from underlying DataTables. So, I have 4
different tables where I get data from.
Strange thing happened. While all boxes were unsorted everything was fine.
Then I got from one of table unsorted data and thought to make it easier for
user - set all boxes, list and combo, to sorted. And I got exceptions in
both listboxes. Collection can't be modified - something like that
exception, which you see usually when trying to remove item from collection
while doing for each. Strange thing - it happened on listbox EndUpdate calls
in both cases. According to stack trace - somewhere inside framework, which
checks data source inside Sort method call.
When I set Sorted = false on both listboxes (removed Sorted = true) and left
combos sorted exceptions disappeared.
I run Net 1.1 SP1.
Looks like behavior of combos is quite different from listboxes in respect
of sorting.
Now I wonder and ponder - is that something related to 1.1 or I am doing
something wrong?
Just a Q
I load them using DataSource property in initializer - by default. I just
assign DataViews, which are built from underlying DataTables. So, I have 4
different tables where I get data from.
Strange thing happened. While all boxes were unsorted everything was fine.
Then I got from one of table unsorted data and thought to make it easier for
user - set all boxes, list and combo, to sorted. And I got exceptions in
both listboxes. Collection can't be modified - something like that
exception, which you see usually when trying to remove item from collection
while doing for each. Strange thing - it happened on listbox EndUpdate calls
in both cases. According to stack trace - somewhere inside framework, which
checks data source inside Sort method call.
When I set Sorted = false on both listboxes (removed Sorted = true) and left
combos sorted exceptions disappeared.
I run Net 1.1 SP1.
Looks like behavior of combos is quite different from listboxes in respect
of sorting.
Now I wonder and ponder - is that something related to 1.1 or I am doing
something wrong?
Just a Q