[Gambas-user] Changing the key value in a collection
bbb888
bbruen at ...2308...
Fri Nov 20 05:16:23 CET 2009
I have a situation where the key for an item in a collection is an editable
value in the collection item. Obviously, when that value changes, I need to
update the collection and change the key. However, when I do this the item
is in a new position in the collection. This is a problem because the
collection is "sorted" via a different item field.
I can handle the sort when the collection is built from the database, but is
there any way to get the collection back into the correct order when the key
value changes? I don't want to persist the changes at the point where the
user changes one item. The goal is to have them work with the set of items,
make adjustments to one or more and then persist their changes under their
control when they are happy with the overall set.
Alternatively, is there a way to sort a gridview? (This is the real problem
I suppose, as when the key value or any other value in the item changes, I
reload the gridview by iterating the collection.)
tia
bruce
--
View this message in context: http://old.nabble.com/Changing-the-key-value-in-a-collection-tp26422299p26422299.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list