--- In flexcoders@yahoogroups.com, "mvbaffa" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I am trying to change the background color of a row in response to
a
> keyboard action. What I am doing is to drive the keyboard event and
> doing this:
>
> adgDatagrid.dataProvider[adgDatagrid.selectedIndex].verified =
true;
> adgDatagrid.invalidateList();
>
> When I call invalidateList the styleFunction defined in my
> AdvancedDataGrid is activated. This is working OK.
>
> The styleFunction changes the foreground, because of another
> condition, perfectly. The problem is when I try to return a
> background style in the same styleFunction it does not change the
> backgroundColor. Below is my styleFunction code:
>
>
> public function customStyleFunctionstyle(data:Object,
> col:AdvancedDataGridColumn):Object {
> try {
> if (data["source"]) return {color:0x008000};
> if (data["verified"]) return {backgroundColor:0x008000};
> }
> catch (err:Error) {}
> return null;
> }
>
>
> Can you help me !!!
>
> Thanks in advance
>
http://flexdiary.blogspot.com/2008/06/musings-on-advanceddatagrid-
part-1.html