14 Replies Latest reply on Oct 4, 2012 5:19 AM by Bert Veldman

    DataGrid Border and htmlText Disappear on Random

    Ivan.K.Vladimirov

      Hi,

       

      I have the following two issues and it is strange that I can not find anything about this in the forum.

       

      First thing is the border around DataGrid or AdvancedDataGrid will dissapear. I can not explain why, but it happens when switching states in MXML file.

      So if I have some conainter with Grid in one state and some other container in another if I switch between these states the border around the table is gone.

      I'm talking about a default DataGrid or Advanced without any renderers or something special. The border will appear again if let say perform a sort on a column or resize it. I probably can fix this by forcing a sort every time I'm entering the state, but still this glitch is extremly annoying and the way my applicaitons are build I will have to perform this fix a 100 of times.

       

      table-border-glitch.png

       

      Similar but nor related issue happens if I try to use the htmlText property with an embeded font (not usre if the issue is because of the font however). If I open a page with such field, text across the whole application will start disapper on random no matter if it is HTML or not. See below an example of one and the same dialog opened 3 times in a row without changing anything. The whole text is a single htmlText string with the first line bold. First case one row of text is missing, second another row is missing and even worse in the third case the text from the Button will dissapper which is not related to the HTML string at all. This will happen in all browser and also occueres even if I just move the mouse or still the focus from the browser.

      Again I have no idea how to fix this. I tried to turn of advanced anti aliasig and use Fleash enginge for MX compoents in the comipler settings with no results.

       

      html-text-glitch.png

       

      Have someone experienced these glitches. Any suggestions on how to fix this are higly appiciated.


      Forgot to mention that the Grid bug happens on all Flex SDKs that I tested - 3.2, 3.5, 4.0, 4.2. And for the HTML thing I only tested with 4.2.

       

      Thanks,

      Ivan

        • 1. Re: DataGrid Border and htmlText Disappear on Random
          Flex harUI Adobe Employee

          See if you can make a simple test case that reproduces the problem.

          • 2. Re: DataGrid Border and htmlText Disappear on Random
            paulfischer

            Yes! I have get the disappearing AdvancedDataGrid border constantly. It happens when switching states. The first view displays correctly, but when I return to the state, the borders are gone. It happens when the AdvancedDataGrid is on a TitleWindow container after the TitleWindow instance is closed and reopened. I do not have the issue when switching using a ViewStack. I do not know about the regular DataGrid because I only use the AdvancedDataGrid. I am currently using 4.1, but I originally saw the problem with TitleWindows on 3.2. I have not used states until Flex 4.0.

             

            I have had no luck trying to google for the issue or solutions, so I am jumping in on this thread to see someone has an answer.

            • 3. Re: DataGrid Border and htmlText Disappear on Random
              Bhargav_Flex

              I understand that this is relatively old post but has anybody found out a solution for the same?

               

              I have a ADG being added to a custom component extending panel. But the borders of the ADG are not seen until I collapse the ADG.

               

              Any help on this problem will be appreciated.

               

              Bhargav

              • 4. Re: DataGrid Border and htmlText Disappear on Random
                Bhargav_Flex Level 1

                Well, I got the cause of my problem. I am playing an Iris effect on

                my popup which is creating the problem.I am trying to invalidate the display after the effect but in vain.

                 

                I still have to see the exact reason for the ADG to be disturbed.

                 

                Bhargav

                • 5. Re: DataGrid Border and htmlText Disappear on Random
                  Ivan.K.Vladimirov Level 1

                  Hi,

                   

                  I'm posting with a little delay, but so many holidays around.


                  Here a very simple Flex 4 application that will reproduce both problems.

                  If you switch to new state and return the border around the grid is gone. If you resize the browser window it is back.

                   

                  For the other problem with the alert HTML I can confirm that it is caused because of the embedded font. You will have to provide a valid url for the .ttf files. I guess any font will work. To show the alert click on the Cancel button in the new state. If you open and close it several times or move it around you will see text disappearing on random.

                   

                  Thanks,

                  Ivan

                   

                  <?xml version="1.0" encoding="utf-8"?>
                  <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                                    xmlns:s="library://ns.adobe.com/flex/spark" 
                                    xmlns:mx="library://ns.adobe.com/flex/mx" 
                                    minWidth="955" minHeight="600">
                       
                       <fx:Style>
                            @namespace s "library://ns.adobe.com/flex/spark";
                            @namespace mx "library://ns.adobe.com/flex/mx";
                            
                            @font-face { src: url("Vera.ttf"); font-family: Vera; font-weight: normal; }
                            @font-face { src: url("Vera-Bold.ttf"); font-family: Vera; font-weight: bold; }
                            @font-face { src: url("Vera-Italic.ttf"); font-family: Vera; font-weight: normal; font-style: italic; }
                            @font-face { src: url("Vera-Bold-Italic.ttf"); font-family: Vera; font-weight: bold; font-style: italic; }
                            
                            s|Application { font-family: Vera; font-grid-fit-type: pixel; font-weight: normal; font-size: 11; }
                            mx|AlertForm { textFieldClass: ClassReference("mx.core.UIFTETextField"); }
                            mx|Button { textFieldClass: ClassReference("mx.core.UIFTETextField"); }
                            mx|AdvancedDataGridHeaderRenderer { textFieldClass: ClassReference("mx.core.UIFTETextField"); }
                       </fx:Style>
                       
                       <fx:Script>
                            <![CDATA[
                                 import mx.controls.Alert;
                                 
                                 use namespace mx.core.mx_internal;
                                 
                                 private function showAlert():void {
                                      Alert.buttonHeight = 24;
                                      
                                      var title:String ="Download Error";
                                      var html:String = "<b>The file could not be downloaded.</b>\n\n" +
                                           "The file you are trying to download may have been deleted or disabled.\n\n" +
                                           "Verify that the file is still available for download.";
                                      
                                      var err:Alert = Alert.show(html, title, mx.controls.Alert.OK);
                                      
                                      err.alertForm.textField.htmlText = html;
                                 }
                            ]]>
                       </fx:Script>
                       
                       <fx:Declarations>
                            <!-- Place non-visual elements (e.g., services, value objects) here -->
                       </fx:Declarations>
                       
                       <s:layout>
                            <s:VerticalLayout/>
                       </s:layout>
                       
                       <s:states>
                            <s:State name="default"/>
                            <s:State name="new"/>
                       </s:states>
                       
                       <s:Panel includeIn="new">
                            <s:controlBarContent>
                                 <s:Button label="Save" click="{this.currentState = 'default'}"/>
                                 <s:Button label="Cancel" click="showAlert();"/>
                            </s:controlBarContent>
                       </s:Panel>
                       
                       <s:Button label="New Item" click="{this.currentState = 'new'}" excludeFrom="new"/>
                       
                       <mx:AdvancedDataGrid width="100%" height="100" excludeFrom="new">
                            <mx:columns>
                                 <mx:AdvancedDataGridColumn headerText="Name"/>
                            </mx:columns>
                       </mx:AdvancedDataGrid>
                  </s:Application>
                  
                  • 6. Re: DataGrid Border and htmlText Disappear on Random
                    A LiveCycle User

                    Hello,

                     

                    I have the same problem with htmlText.

                    I want to display a html text in a popup and some text disappear randomly.

                    Did you find a solution for this problem ?

                    Thanks in advance.

                    • 7. Re: DataGrid Border and htmlText Disappear on Random
                      robo_eq

                      Hi,

                       

                      I have exactly the same problem.

                       

                      Does anyone have a solution to this?

                       

                      Cheers,

                      Rob.

                      • 8. Re: DataGrid Border and htmlText Disappear on Random
                        Flex harUI Adobe Employee

                        Looks like a bug.  A workaround is:

                         

                            <mx:AdvancedDataGrid width="100%" height="100" excludeFrom="new"

                        enabled.new="false"

                        1 person found this helpful
                        • 9. Re: DataGrid Border and htmlText Disappear on Random
                          Ivan.K.Vladimirov Level 1

                          Thanks for the feedback!

                           

                          I also found that if I set the variableRowHeight="true" the bug with the table border is gone.

                           

                          Unfortunally I still do not have a solution for the htmlText issue.

                          • 10. Re: DataGrid Border and htmlText Disappear on Random
                            Flex harUI Adobe Employee

                            Try the 4.5 prerelease and see if it solves the htmlText issue.

                            • 11. Re: DataGrid Border and htmlText Disappear on Random
                              tanium

                              Flex harUI's workaround did not work for me ( excludeFrom="new" enabled.new="false")

                               

                              Ivan's workound did ( variableRowHeight="true" )

                              • 12. Re: DataGrid Border and htmlText Disappear on Random
                                SalmanAwan

                                Ivan's workound fixed it for me (variableRowHeight="true") , for disappearing border problems of AdvancedDataGrid

                                • 13. Re: DataGrid Border and htmlText Disappear on Random
                                  david.skx

                                  variableRowHeight="true" works for me as well.

                                   

                                  Strange bug!

                                  • 14. Re: DataGrid Border and htmlText Disappear on Random
                                    Bert Veldman

                                    +1 for the variableRowHeight="true"