[flexcoders] Re: Multiple ItemRenderers for a single DataGridColumn
Oh my, what a difference! I didn't know about this function. Extended DataGrid, override createColumnItemRenderer, now my code is much cleaner and it actually completely took care of my performance issue on this grid. I still need to run it through the profiler to make sure that I'm not doing anything stupid inside of it since it fires so often. Does their happen to be a function or event for when a renderer is no longer being displayed? I'd like to create a pool and reuse the renderers as right now I'm creating new in this function. That's the reason I want to run it through the profiler. Thanks a bunch! Dale --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: In Flex3, we added a createColumnItemRenderer method that in theory will let you return different renderers per-row. Might be worth a try. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Saturday, May 24, 2008 6:45 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Multiple ItemRenderers for a single DataGridColumn I have a DataGrid and one of the columns I need to be able to do the following based on the user security setting and the data in the column. So each row in the DataGrid for a single user may have different behavior and ItemRenderers. 1. Do not show any data and mark the cell not editable. Still show the column, just blank out the cell and do not allow editing. 2. Allow the user to see the data, but not edit it. I would like this to simply show as a Text field. 3. Display the data, and allow the user to edit the data via a TextInput control. 4. Display the data, and allow the user to edit the data via showing a CheckBox control. I know how to do each individually, but I do not know how to do this all at the same time in a single DataGridColumn. Can I do this? Thanks, Dale
[flexcoders] Re: Multiple ItemRenderers for a single DataGridColumn
To my great displeasure I don't see the createColumnItemRenderer function in the AdvancedDataGrid. What do you suggest for the AdvancedDataGrid as I have the same issue here. Thanks, Dale --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: In Flex3, we added a createColumnItemRenderer method that in theory will let you return different renderers per-row. Might be worth a try. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Saturday, May 24, 2008 6:45 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Multiple ItemRenderers for a single DataGridColumn I have a DataGrid and one of the columns I need to be able to do the following based on the user security setting and the data in the column. So each row in the DataGrid for a single user may have different behavior and ItemRenderers. 1. Do not show any data and mark the cell not editable. Still show the column, just blank out the cell and do not allow editing. 2. Allow the user to see the data, but not edit it. I would like this to simply show as a Text field. 3. Display the data, and allow the user to edit the data via a TextInput control. 4. Display the data, and allow the user to edit the data via showing a CheckBox control. I know how to do each individually, but I do not know how to do this all at the same time in a single DataGridColumn. Can I do this? Thanks, Dale
RE: [flexcoders] Re: Multiple ItemRenderers for a single DataGridColumn
ADG is developed by an entirely different team. They have an undocumented method called columnItemRenderer that has the same function signature and looks like it does the same thing. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Sunday, May 25, 2008 8:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Multiple ItemRenderers for a single DataGridColumn To my great displeasure I don't see the createColumnItemRenderer function in the AdvancedDataGrid. What do you suggest for the AdvancedDataGrid as I have the same issue here. Thanks, Dale --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: In Flex3, we added a createColumnItemRenderer method that in theory will let you return different renderers per-row. Might be worth a try. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of dbronk Sent: Saturday, May 24, 2008 6:45 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Multiple ItemRenderers for a single DataGridColumn I have a DataGrid and one of the columns I need to be able to do the following based on the user security setting and the data in the column. So each row in the DataGrid for a single user may have different behavior and ItemRenderers. 1. Do not show any data and mark the cell not editable. Still show the column, just blank out the cell and do not allow editing. 2. Allow the user to see the data, but not edit it. I would like this to simply show as a Text field. 3. Display the data, and allow the user to edit the data via a TextInput control. 4. Display the data, and allow the user to edit the data via showing a CheckBox control. I know how to do each individually, but I do not know how to do this all at the same time in a single DataGridColumn. Can I do this? Thanks, Dale
[flexcoders] Re: Multiple ItemRenderers for a single DataGridColumn
Hi Dale, An itemRenderer is a component. You can use states within an itemRenderer; that are conditionally set. If you override the set data method, you can change the component's state there; to meet your needs. You could also use a viewStack in the itemRenderer and do the same thing. -TH --- In flexcoders@yahoogroups.com, dbronk [EMAIL PROTECTED] wrote: I have a DataGrid and one of the columns I need to be able to do the following based on the user security setting and the data in the column. So each row in the DataGrid for a single user may have different behavior and ItemRenderers. 1. Do not show any data and mark the cell not editable. Still show the column, just blank out the cell and do not allow editing. 2. Allow the user to see the data, but not edit it. I would like this to simply show as a Text field. 3. Display the data, and allow the user to edit the data via a TextInput control. 4. Display the data, and allow the user to edit the data via showing a CheckBox control. I know how to do each individually, but I do not know how to do this all at the same time in a single DataGridColumn. Can I do this? Thanks, Dale