Link to home
Create AccountLog in
Avatar of arigs
arigs

asked on

itemrenderer

Hi Experts,

                Here is my question, I am implementing itemrenderer to display the changed data in column of the advanceddatagrid. In that column i am displaying messages and button. when I change the status of these messages I need to display the corresponding change(i.e. active button to inactive button and red color message to normal color).
here is my snippet

override public function set data(value:Object):void
                  {
                        _data = value;
                        if(_data != null)
                        {
                              
                              
                              lblSubject.text = _data.subject;
                              
                              if(data.priority == '1')
                              {
                                    
                                    lblSubject.setStyle("color","red");
                                    togglePin.enabled= true;
                              }
                              else
                              {
                                    
                                    lblSubject.setStyle("color","black");
                                    togglePin.enabled = false;
                              }
                              
                              if(_data.unRead)
                              {
                                    lblSubject.setStyle("fontWeight","bold");
                              }else
                              {
                                    lblSubject.setStyle("fontWeight","normal");
                              }
                        }
                        
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer