If all you want is for the datagrid to refresh from the data already in
it's dataProvider (ie, each grid row updates to what you want when you
rollover), then try:
var current_vpos = myGrid.vPosition;
myGrid.dataProvider = myGrid.dataProvider;
myGrid.vPosition = current_vpos;
Regards,
Grant Cox
Chuck Hoffman wrote:
I'd like to get a DataGrid (or better yet, one of its columns) to
redraw itself, so as to reflect a change made to item(s) in its
dataProvider.
Specifically, I have a field called 'select', and for its column in
the DataGrid I use a CellRenderer containing a CheckBox, which
responds to clicks to the CheckBox by setting the select field of the
given item appropriately.
However, I'd also like to add a "select all" checkbox. I have no
problem responding to clicks on the CheckBox with a quick
looping-through of the dataProvider setting the select fields on each
item to true or false, as the case may be.
But I can't seem to get the DataGrid to redraw right away to reflect
the change. The CheckBoxes will redraw correctly only when I mouse
over the rows.
I should note that a co-worker of mine got this functionality working
using code on the timeline, whereas I'm trying to do it within a class
to which the MovieClip containing the DataGrid is linked and having
considerably less luck with it.
I've tried calling invalidate(), redraw(), draw(), and refresh(), on
the DataGrid, and a few combinations of two or more of these, all to
no avail (do any of those functions actually *do* anything??)
Many thanks
--ch--
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com