you can use below method in datagridcolumn component
override public function set data(value:Object):void
{
if(value != null)
{
super.data = value;
if(value[DataGridListData(listData).dataField] < 10) {
setStyle("color", 0xFF0000);
}
else {
setStyle("color", 0×000000);
}
}
}
http://butterfliesandbugs.wordpress.com/2007/06/14/changing-text-color-in-a-datagrid-using-itemrenderers/
this will help you or elase let me know
when service come in if loop should be adjusted acordingly
--
Karthik.k
Mobile - +91-9894991640
http://karthikkprofile.blogspot.com/
On Mon, Feb 2, 2009 at 10:49 PM, Venkat Viswanathan
<[email protected]>wrote:
> Hi Sam,
>
> You will have to use filterFunction inside override set data.
> filterFunction should do the trick.
>
> Regards,
> Venkat
> www.venkatv.com
>
>
>
> On Mon, Feb 2, 2009 at 7:54 PM, Sam <[email protected]> wrote:
>
>>
>> Hi Flex Buddies,
>>
>> I'm using a ComboBox as an itemRenderer to a DataGridColumn, based on
>> certain conditions i need to change the content of dataprovider to the
>> ComboBox.
>> scenario 1 :
>> ->my dataprovider is : new ArrayCollection
>> ([{value:"one",active:"y"},{value:"two",active:"y"},
>> {value:"three",active:"n"},{value:"four",active:"y"},
>> {value:"five",active:"n"}]);
>> ->initially when i'm feching data from the database i need all items
>> ie; where active = 'y' or 'n' should appear in the Combobox.
>> ->I have a provision to add a new row , when i add, only items with
>> active ='y' should contain in the newly added row's combobox but the
>> previous existing row should contain all the items in the
>> dataprovider;
>>
>> I don't know how far filter function as well as label function would
>> solve this, since i did not get much time to explore them on this
>> requirement.
>> can Some body help me out in fixing this. any queries are welcome.
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---