0 Replies Latest reply on Feb 23, 2011 12:29 AM by Ben@msterdam

    AdvancedDataGrid content disappearing when setting rendererProviders..

    Ben@msterdam
      Hi All,

       

      Thanks for the community support, really useful.
      I am using the SDK 4.1.

       

      Here is the explanation of my problem.I am using a detail renderer inside a ADG, which appears when clicking on a certain column.
      This is done is AS3 (I mean not with mxlm tags), using the ADG rendererProviders property with an item renderer passed to a ClassFactory.
      This is working ok, until a certain point..

       

      Indeed, the grid contains many columns, with images item renderers and when I am horizontally scrolling through the column, a display bug make all the ADG content disappear.. Headers remain but all the data are gone. A user action that may update the data has to be done to make the data come back of course.

       

      This bug seems to be known by a few, but unfortunately all the solutions are useless in my case (setting the property horizontalScrollPolicy = 'auto' for each column for instance).

       

      After some research it appears that the line responsible for making the whole thing vanishing is the update of the variable rendererProviders:

      ie this.rendererProviders.push(_detailRendererProvider);

       

      In the AdvancedDataGrid.as class, the property setter, after updating its value of course make 2 other intructions :
      invalidateSize();
      invalidateDisplayList();

      It seems this is a bit too much for the DG to handle (note that I call this.validateNow(); after the rendererProviders update in my code).

       

      Note as well that if I do not set :
      this.variableRowHeight = true;
      An error pops up from the class AdvancedDataGridBaseEx in the configureScrollBars method, doing :
      var headerPosX:int =  lastHeaderInfo.headerItem.x;
      (headerItem is null)

       

      So, end of the day, I am stuck..
      Many thanks for your help, hoping it will arouse some lights..

       

      Benjamin