J
JohnR
I have a table in a dataset whose fields are bound to various controls on my
form. The records are sorted by primary key so when I use the
currencymanager to navigate the data, it all appears sorted. When I add a
new row to this table and save it (using dataadapter.update) it appears at
the end of the list no matter where it should fall in the sorted list. When
I exit and re-enter the form the newly added record is then presented in the
proper sorted order. Clearly when re-entering the form I reload the
dataset, create all the data bindings, etc all from scratch. My question
is that, short of reloading the entire dataset and recreating the bindings,
what do I need to do to "reorder" the data once I add the new row so that
the new row will appear in the proper place in the list. I've tried a
CurrencyManager.Refresh and sorting the dataset.table by the proper column,
but in each case the Currencymanager seems to get confused and all types of
weirdness happens.
Any suggestions? Thanks...
form. The records are sorted by primary key so when I use the
currencymanager to navigate the data, it all appears sorted. When I add a
new row to this table and save it (using dataadapter.update) it appears at
the end of the list no matter where it should fall in the sorted list. When
I exit and re-enter the form the newly added record is then presented in the
proper sorted order. Clearly when re-entering the form I reload the
dataset, create all the data bindings, etc all from scratch. My question
is that, short of reloading the entire dataset and recreating the bindings,
what do I need to do to "reorder" the data once I add the new row so that
the new row will appear in the proper place in the list. I've tried a
CurrencyManager.Refresh and sorting the dataset.table by the proper column,
but in each case the Currencymanager seems to get confused and all types of
weirdness happens.
Any suggestions? Thanks...