RE: [flexcoders] Re: ItemRenderer frustration! - What to invalidate??
XMLListCollection."refresh" is not intended to work in this case. "refresh" just causes the filter or sort to be re-applied. If it works to refresh the UI, it is by accident. The documented way to handle this issue is to use the collection API to make the update, or, if you directly set a property on an item, call collection.itemUpdated(item) Tracy Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, April 15, 2009 11:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ItemRenderer frustration! - What to invalidate?? Did you try myXMLListCollection.refresh() ? --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, oopdog wrote: > > I was given the answer - I'll share it in case it helps anyone else. It was > to use callLater > > callLater(myDataGrid.invalidateList); > > > > > On Wed, Apr 15, 2009 at 12:20 PM, oopdog wrote: > > > Hello there, > > > > I have a DataGrid and one of the columns contains a custom CheckBox (item > > renderer/editor). > > > > When the user selects the CheckBox I want to over-ride a value in another > > column. The problem is that the value of the other column is not updating > > until AFTER the user has selected a different row or has taken focus away > > from the DataGrid by clicking on something else, but I would really like the > > column to update as soon as the CheckBox has been checked. > > > > Currently this is what I have: > > > > 1) User clicks checkbox ( I capture the 'onItemBegin' event and check that > > it's the CheckBox which is being edited... if (event.itemRenderer is > > CheckBox) ... > > 2) I examine the underlying data (in this case it's an XMLListCollection) > > and if conditions are correct I change the value of my data property, then > > call myDataGrid.invalidateList(); > > > > Nothing seems to update the DataGrid visually until the user has clicked > > something else! > > I have tried calling all the invalidation methods I can think of, as well > > as validateNow() So frustrated! Please help. > > >
[flexcoders] Re: ItemRenderer frustration! - What to invalidate??
Did you try myXMLListCollection.refresh() ? --- In flexcoders@yahoogroups.com, oopdog wrote: > > I was given the answer - I'll share it in case it helps anyone else. It was > to use callLater > > callLater(myDataGrid.invalidateList); > > > > > On Wed, Apr 15, 2009 at 12:20 PM, oopdog wrote: > > > Hello there, > > > > I have a DataGrid and one of the columns contains a custom CheckBox (item > > renderer/editor). > > > > When the user selects the CheckBox I want to over-ride a value in another > > column. The problem is that the value of the other column is not updating > > until AFTER the user has selected a different row or has taken focus away > > from the DataGrid by clicking on something else, but I would really like the > > column to update as soon as the CheckBox has been checked. > > > > Currently this is what I have: > > > > 1) User clicks checkbox ( I capture the 'onItemBegin' event and check that > > it's the CheckBox which is being edited... if (event.itemRenderer is > > CheckBox) ... > > 2) I examine the underlying data (in this case it's an XMLListCollection) > > and if conditions are correct I change the value of my data property, then > > call myDataGrid.invalidateList(); > > > > Nothing seems to update the DataGrid visually until the user has clicked > > something else! > > I have tried calling all the invalidation methods I can think of, as well > > as validateNow() So frustrated! Please help. > > >
[flexcoders] Re: ItemRenderer frustration! - What to invalidate??
I was given the answer - I'll share it in case it helps anyone else. It was to use callLater callLater(myDataGrid.invalidateList); On Wed, Apr 15, 2009 at 12:20 PM, oopdog wrote: > Hello there, > > I have a DataGrid and one of the columns contains a custom CheckBox (item > renderer/editor). > > When the user selects the CheckBox I want to over-ride a value in another > column. The problem is that the value of the other column is not updating > until AFTER the user has selected a different row or has taken focus away > from the DataGrid by clicking on something else, but I would really like the > column to update as soon as the CheckBox has been checked. > > Currently this is what I have: > > 1) User clicks checkbox ( I capture the 'onItemBegin' event and check that > it's the CheckBox which is being edited... if (event.itemRenderer is > CheckBox) ... > 2) I examine the underlying data (in this case it's an XMLListCollection) > and if conditions are correct I change the value of my data property, then > call myDataGrid.invalidateList(); > > Nothing seems to update the DataGrid visually until the user has clicked > something else! > I have tried calling all the invalidation methods I can think of, as well > as validateNow() So frustrated! Please help. >