you could extend the model to include text selection coordinates but if that triggers a save you could create a dictionary for data that has selection coordinates.
on prepare or set data of the item renderer check if selection data exists for the given item: // pseudo code var selectionData:Array = Manager.getInstance().selectionDictionary[data]; if (selectionData) richText. setSelection(selectionData[0],selectionData[1]); you would have had to have stored that data previously. On Monday, July 15, 2013, Gary Young wrote: > Just want to clarify that I meant the itemRenderer should TRIGER the > refreshing, the actual refresh code should be in the model, which in this > case, should be itemRenderer's data. -Gary > > > On Mon, Jul 15, 2013 at 4:06 PM, mark goldin <[email protected]> > wrote: > > > That's exactly how I have done it. But like I said, the problem is that I > > am modifying data model and that will cause a prompt for data save. > > > > > > On Mon, Jul 15, 2013 at 3:02 PM, Les Bantleman < > [email protected] > > >wrote: > > > > > Hi Mark, > > > > > > Idealy the itemRenderer should be responsible for renderering (not > > > searching). Have you considered adding a property to the data row > object > > > which can be used to flag if the row matches the search term? A search > > > procedure could iterate the dataProvider updating this (boolean) flag. > > The > > > renderer could then simply highlight search matches based on the flag. > > Just > > > an idea. > > > > > > Les > > > > > > > > > > > > On 15 July 2013 19:35, mark goldin <[email protected]> wrote: > > > > > > > Here is my problem. I need to keep data that would drive text > selection > > > > somewhere. Ideal place is a dataProvider. But using dataProvider > > creates > > > > another problem. Change manager reports about data being changed, > > > because I > > > > am updating dataProvider. How can I avoid using datagrid's > dataProvider > > > for > > > > storing text highlights coordinates? > > > > > > > > Thanks > > > > > > > > > > > > On Fri, Jul 12, 2013 at 9:10 PM, Gary Young <[email protected]> > > > > wrote: > > > > > > > > > I think Alex is right, each renderer instance should do the search > by > > > > self, > > > > > because of virtual layout, datagrid only keep creating/reusing the > > > > renderer > > > > > insts in the visible area, so the performance will be great. -Gary > > > > > > > > > > > > > > > On Fri, Jul 12, 2013 at 9:57 PM, mark goldin < > [email protected]> > > > > > wrote: > > > > > > > > > > > That means I need to store selection coordinates somewhere in the > > > > > > dataProvider to reapply selection every time datagrid is > scrolled. > > Is > > > > > that > > > > > > correct? > > > > > > > > > > > > > > > > > > On Fri, Jul 12, 2013 at 8:08 PM, Alex Harui <[email protected]> > > > wrote: > > > > > > > > > > > > > The principle of virtual renderers is that they would do their > > > > > > > highlighting as they get scrolled onto the screen, not all at > > once. > > > > > > > > > > > > > > On 7/12/13 5:11 PM, "mark goldin" <[email protected]> > wrote: > > > > > > > > > > > > > > >No, I am not filtering dataprovider. I need to search thru all > > > cells > > > > > in > > > > > > > >the > > > > > > > >column and highlight all instances of search text at once. Can > > be > > > > > > hundreds > > > > > > > >of rows. > > > > > > > > > > > > > > > > > > > > > > > >On Fri, Jul 12, 2013 at 5:40 PM, Alex Harui <[email protected] > > > > > > wrote: > > > > > > > > > > > > > > > >> I'm not sure what are you trying to accomplish. You could > > > filter > > > > > the > > > > > > > >> dataprovider so that only rows with text hits are shown in > the > > > DG. > > > > > > That > > > > > > > >> code would not be in the renderer. Otherwise, code in the > > > > renderer > > > > > > that > > >
