Re: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Alex Harui
My recommendation is to borrow code from DataGridBase On 2/13/10 5:21 PM, "Mike" wrote: Because this is an library for exporting to other formats I only need to instantiate one renderer at a time. Memory requirements should therefore be modest. I have implemented a mechanism to export

[SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Mike
Because this is an library for exporting to other formats I only need to instantiate one renderer at a time. Memory requirements should therefore be modest. I have implemented a mechanism to export the display lists of non-text item renderers. The tricky part is learning how to instantiate an

Re: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Alex Harui
flexcoders] Obtaining rendered text from a DataGrid I have no control over the dataProvider at all. Performance is not an issue, because the data extraction only happens once, and it can be time-sliced it so the webapp does not appear to freeze. Passing through multiple event handlers,

RE: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Tracy Spratt
groups.com] On Behalf Of Mike Sent: Saturday, February 13, 2010 2:10 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid I have no control over the dataProvider at all. Performance is not an issue, because the data extraction on

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Mike
I have no control over the dataProvider at all. Performance is not an issue, because the data extraction only happens once, and it can be time-sliced it so the webapp does not appear to freeze. Passing through multiple event handlers, including EnterFrame would be perfectly acceptable. > 3) D

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-13 Thread Amy
--- In flexcoders@yahoogroups.com, "Mike" wrote: > > I must take the DataGrid as I find it. If no labelFunction is defined, that > approach won't work; also each item in the dataProvider might be manifested > in 0 or more columns. This approach probably won't be general enough. Do you have

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
Alex, Your code is very interesting, and quite instructive. Thank you. You said that your code handles labelFunction and dataField; however the asdoc for the itemToLabel() method reads: public function itemToLabel(data:Object):String "Returns the string the renderer would display for the give

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Alex Harui
I’m still not sure what your goal is and what things are under your control. I can have a renderer that displays content not found in the data provider, or one that shows colors and no text. A renderer can have multiple text widgets inside it and be mixed with other controls. Is there some co

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I must take the DataGrid as I find it. If no labelFunction is defined, that approach won't work; also each item in the dataProvider might be manifested in 0 or more columns. This approach probably won't be general enough. Thanks, Mike > You should be able to do this by running the labelFunc

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Amy
--- In flexcoders@yahoogroups.com, "Tracy Spratt" wrote: > > I will answer, but you probably won't like the answer. > > > > This is simply not possible. In order to optimize performance, DataGrid and > the other list components only create(render) the visible elements. If a > row is not vi

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
--- In flexcoders@yahoogroups.com, "turbo_vb" wrote: > > If you don't have too many items in the dataProvider, you could create a > second DataGrid, with the same DataProvider and itemRenderers, that does not > have a height set and is not visible. The second DataGrid would render all > of t

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread turbo_vb
If you don't have too many items in the dataProvider, you could create a second DataGrid, with the same DataProvider and itemRenderers, that does not have a height set and is not visible. The second DataGrid would render all of the items in the dataProvider, because the height isn't set. Then

Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Mike
I need to post the displayed data to a server, complete with formatting. The dataProvider does not help much; I'd have to replicate the work that the datagrid does in determining the properties displayed by each column, and duplicate the job of the item renderers in order to extract the display

RE: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid

2010-02-12 Thread Tracy Spratt
ebruary 12, 2010 4:06 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid I need extract the rendered text from all cells of a DataGrid, whether or not they are all displayed. The following code dies because renderer is null: