Yep. Tom, Lach is correct, and here is an explanation with a bit more
detail.
If your DataGrid's dataProvider has 100 items, but it is only big
enough to display 10 at any given time, the DataGrid only actually
draws 10 items, in order to maximize performance. When you scroll the
DataGrid there
PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Tuesday, December 19, 2006 8:40 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside DataGrid when
dataProvider is updated?
Yep. Tom, Lach is correct, and here is an explanation with a bit more
detail.
If your
: [flexcoders] Re: How do I reset itemRenderer inside DataGrid when
dataProvider is updated?
Hey Tim,
No worries, I didn't think you were being harsh, I just wanted to
clarify what I was referring to. I am very new to Flex, so as long as
it doesn't involve calling me names I am willing to listen to just
: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ben.clinkinbeard
Sent: Thursday, July 20, 2006 11:59 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Hey Tim,
No worries, I didn't think you
:59 AM
To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Hey Tim,
No worries, I didn't think you were being harsh, I just wanted to
clarify what I was referring to. I am very
Sorry if this is out of left field (and wrong), as I haven't read
through the rest of the thread, but is it the case that dataChange is
fired during scrolling because the item renderers are reused by the
list control with different items in the dataProvider?
Cheers,
Lach
On 19/12/2006,
Not sure if this was 100% the right way to accomplish what i needed, but it worked for me...I've got a DataGrid with an itemRenderer instance that colors the background of my rows differently based on selection order... yada yada...
Anyway, came across this problem when I wanted to clear my
LOL... guess I should clarify that the setSelectionStyle method inside the renderer would check to see if this item was a selected item or not, and would set the backgroundColor style appropriately...
On 8/4/06, Brendan Meutzner [EMAIL PROTECTED] wrote:
Not sure if this was 100% the right way
Hey Tim,
No worries, I didn't think you were being harsh, I just wanted to
clarify what I was referring to. I am very new to Flex, so as long as
it doesn't involve calling me names I am willing to listen to just
about any advice. Actually, I could probably overlook namecalling if
the info was
Thanks to everyone for the replies. Unfortunately, this approach has a
rather nasty side effect, which I can only assume is a bug. Also,
isn't this the same as having an event handler for the dataChange
event on the itemRenderer?
The side effect is that if your DataGrid has a scrollbar and you
: Tuesday, July 18, 2006 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Thanks for the reply, Tim. Unfortunately, the selected state is
not
held in the data. The checkboxes should
Of ben.clinkinbeard
Sent: Tuesday, July 18, 2006 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Thanks for the reply, Tim. Unfortunately, the selected state
Hi Tim,
The part I was referring to as 'dirty and hackish' was having to check
to see if the data was actually new, due to the fact that the
event/method fires whenever a row is scrolled in or out of view. I can
only assume this is a bug and will attempt to report it as such unless
someone
Hi Ben,
Sorry if I came off harshly. I don't think that this is a bug, but rather an opinion difference concerning usage. Every visible cell in a DataGrid is a unique instance of an itemRenderer that is destroyed and created or recycled every time the grid is rendered. In thinking about your
with
enough time for validatino to get a few draws in.
- Original Message -
From: Tim Hoff
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 19, 2006 11:07 PM
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when dataProvider is updated?
Hi Ben,
Sorry if I came off
Correction: even the labels are not updating sometimes.
--- In flexcoders@yahoogroups.com, ben.clinkinbeard
[EMAIL PROTECTED] wrote:
Hello, I have seen this dicussed on here a bit but nothing seems to be
working for me. I have a DataGrid whose dataProvider property is bound
to an XMLList. One
Hey Ben,
In addition to setting the label, you have to set the selected property.
var q:QName = new QName(DOCUMENT_METADATA_NAMESPACE, "PlanNumber");var r:QName = new QName(DOCUMENT_METADATA_NAMESPACE, "PlanNumberSelected");cb_planNumber.label = data[q];cb_planNumber.selected =
Actually Ben, you shouldn't have to get the data in the itemRenderer. The data should be passed to the itemRenderer from the DataGridColumn. The itemRenderer would look like this:
?xml version="1.0" encoding="utf-8"?mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
Thanks for the reply, Tim. Unfortunately, the selected state is not
held in the data. The checkboxes should always begin unchecked, but
the user can (obviously) check them. The checkboxes apparently get
reused though, not all created every time, because
cb_planNumber.selected = false; does not
@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Thanks for the reply, Tim. Unfortunately, the selected state is not
held in the data. The checkboxes should always begin unchecked, but
the user can (obviously) check them
Of ben.clinkinbeard
Sent: Tuesday, July 18, 2006 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I reset itemRenderer inside
DataGrid when
dataProvider is updated?
Thanks for the reply, Tim. Unfortunately, the selected state is
not
held in the data. The checkboxes
21 matches
Mail list logo