J
jez
I've got a ListBox and a DataGrid. Both use different DataTables (both
DataTables are connected with a DataRelation : Parent<->Child).
ListBox uses customersTable
DataGrid uses productsTable
When I click on an entry in the ListBox the ListBox_SelectedIndexChanged
event is called that fires one of my methods that refreshes the DataGrid and
filters out all the products that do not belong to the customer that was
clicked (I do that using a filter on the customerID in the DataGrid).
It works fine only that I need to click twice on an entry in the ListBox for
my DataGrid to be refreshed. In other words, it seems like the
ListBox_SelectedIndexChanged has to be fired twice so that my DataGrid is
refreshed properly.
I tried to be clever (and it didn't work..) and included my method twice in
ListBox_SelectedIndexChanged to see what happens - still same problem. I
actually need to click twice on ListBox item so that my DataGrid is updated.
What is interesting though is that after clicking it once some of the other
items (for example labels) _are_ updated!
Does anyone have any clue as to what I should do ?
Thanks!
DataTables are connected with a DataRelation : Parent<->Child).
ListBox uses customersTable
DataGrid uses productsTable
When I click on an entry in the ListBox the ListBox_SelectedIndexChanged
event is called that fires one of my methods that refreshes the DataGrid and
filters out all the products that do not belong to the customer that was
clicked (I do that using a filter on the customerID in the DataGrid).
It works fine only that I need to click twice on an entry in the ListBox for
my DataGrid to be refreshed. In other words, it seems like the
ListBox_SelectedIndexChanged has to be fired twice so that my DataGrid is
refreshed properly.
I tried to be clever (and it didn't work..) and included my method twice in
ListBox_SelectedIndexChanged to see what happens - still same problem. I
actually need to click twice on ListBox item so that my DataGrid is updated.
What is interesting though is that after clicking it once some of the other
items (for example labels) _are_ updated!
Does anyone have any clue as to what I should do ?
Thanks!