7 Replies Latest reply on Feb 3, 2011 12:51 AM by afxgroup1976

    Refresh problem with Internet Explorer

    afxgroup1976

      Hi,

      I'm using an Advanced Data Grid in a flex application that works in push with blazeds and tomcat.

      I have a strange problem only in one field and only with internet explorer. With all other browsers (firefox, chrome and safari) i have no problem at all.

      The problem is this one:

      A colum is bounded with a field that i receive via push but the value disappear when i go with mouse over the component and also after few seconds.. Since the web page has a scroll bar (in IE and not that one of the scroller), if i click with the mouse on the scroll bar the data in the column is redraw again..

      That's weird.. My AdvancedDataGrid has an itemrender that cause this problem. If i remove the itemrender and use the value into the dataField i have no problem at all:

       

      The code of the item render is very simply:

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
                                                xmlns:s="library://ns.adobe.com/flex/spark" 
                                                xmlns:mx="library://ns.adobe.com/flex/mx" 
                                                autoDrawBackground="false">
           
           <fx:Declarations>
                <mx:NumberFormatter id="numberFormatter"
                                         decimalSeparatorFrom=","
                                         decimalSeparatorTo=","
                                         precision="2"
                                         rounding="nearest"
                                         thousandsSeparatorFrom="."
                                         thousandsSeparatorTo="."
                                         useNegativeSign="true"
                                         useThousandsSeparator="true"/>
                
           </fx:Declarations>
           <s:states>
                <s:State name="default" />
                <s:State name="disabled" />
           </s:states>
           <fx:Style source="fonts.css" />
           <fx:Script>
                <![CDATA[
                     import beans.Constants;
                     import beans.Odd;
      
                     [Bindable]
                     public var odd:Odd;
                     [Bindable]
                     public var oddValue:String;
                     [Bindable]
                     public var oddActive:Boolean;
                     [Bindable]
                     public var oddSignId:Number;
                     
                     override public function set data(value:Object):void {
                          if (value!=null) {
                               odd = value as Odd;
                               oddSignId = odd.signid;
                               oddActive=odd.active;
                               if (odd.active) {
                                    if (odd.value>0)
                                    {
                                         oddValue=numberFormatter.format(odd.value);
                                    }
                                    else
                                         oddValue="0";
                               }
                               else
                                    oddValue="0";
                          }
                          else
                               oddActive=false;
                     }
                     
                     
                     protected function openPopup():void     {
                          var eventid:Number = parentApplication.eventList.selectedItem.row_id;
                          ExternalInterface.call('sendbet',eventid, oddSignId, oddValue, parentDocument.aux);
                     }
                     
                ]]>
           </fx:Script>
           <s:Label id="lblData" text="{oddValue}" width="100%" right="5" textAlign="right" verticalCenter="0" styleName="negot" visible="{oddActive==true}"/>
           
           <s:Group click="openPopup();" top="0" left="0" right="0" bottom="0" alpha="0.4" includeIn="default" enabled="{oddActive==true}"/>
           
      </s:MXAdvancedDataGridItemRenderer>
      
      

       

      i use itemrenders everywhere and i have no problem at all.. only in this case.. keep in mind that i've also tried to remove the override, the group, the autoDrawBackground to true, no numberFormatter and so on... no way.. the only solution is to remove the itemRender..

       

      Any hint?

       

      Andrea