I posted a response which suggested where the issue was as yes, I know this can be made to work as expected.
A simple change can make it work but it doesn't fulfill the requirements that I have (with regards to making a reusable component that can be customized by derivation and overriding methods). The post does provide a code snippet which illustrates what does and doesn't work. --- In [email protected], "rueter007" <[EMAIL PROTECTED]> wrote: > > Hey, sorting the grid should definitely update the tilelist if you are > using the same dataprovider. I have a working sample for this scenario > too. > > Can you post some code so we can take a look and see whats wrong in there. > > - venkat > http://www.venkatj.com > --- In [email protected], "Alex" <mcleod_alex@> wrote: > > > > I have a problem with a viewStack that has 2 views, a dataGrid and a > > tileList view both of which which share a common dataProvider. > > > > - The tileList uses an itemRenderer to draw an icon/name for each item. > > - The datagrid affords the ability to sort the displayed items by > > clicking on the column headers. > > > > The initial display of both views is as expected, the sort order in > > the tileList view matches that of the items in the dataGrid view. > > > > A "trace" of the data items in the dataProvider invoked whenever I > > switch between views [via trace(datagrid.dataProvider) and > > trace(tilelist.dataProvider)] both show the items in the list in the > > order expected regardless of how many times I switch views back and > forth. > > > > The items (a ListCollectionView of items of type "Foo") listed by the > > trace as expected reflect the format of the "toString" function in the > > Foo class. > > > > Now the problem... > > > > 1) When I click a header in the dataGrid view to re-sort the data > > subsequent trace output of the dataProvider's list of objects changes > > to another format: > > > > (Array)#0 > > [0] (com.emc.sspg.cem.data::Foo)#1 > > attribute1_name = value1 > > attribute2_name = value2 > > [1] (com.emc.sspg.cem.data::Foo)#1 > > > > etc. > > > > I'm not sure why this happens.. > > > > 2) The array elements in the trace output are reordered to reflect the > > expected sort order as displayed in the dataGrid view AND the tileList > > view BUT the order of the actual icons drawn in the tileList view does > > not match the order of the items traced. (In fact I've yet to be able > > to discern what order they are now drawn in, its not the original > > "pre-sorted" order either.) > > > > --------- > > > > Another subtlety my trace statements have pointed out is that only the > > 1st time the icon view is drawn do the item renderers get called to > > actually get the icon and name to display. > > > > Solution-wise, while not a great solution I've tried to insert various > > functions to invalidate the drawing such that subsequent views of the > > icon view would re-call the renderers to prove to me that they are > > being drawn in the order that I'm seeing them left-to-right, > > top-to-bottom in the tileList but none of the following cause that to > > occur. > > > > tilelist.invalidateDisplayList(); > > tilelist.invalidateList(); > > tilelist.invalidateProperties(); > > tilelist.dataProvider.refresh(); > > > > Any thoughts regarding this would be appreciated. > > > > Thanks > > >

