6 Replies Latest reply on Jun 15, 2011 6:56 PM by agile116@hotmail.com

    Customed AdvancedDataGrid style issue

    agile116@hotmail.com Level 1

      Hi All,


      I have a css file called style.css. The content snippet is below.


      @namespace controls "mx.controls.*";

      controls|AdvancedDataGrid {


          defaultLeafIcon: ClassReference(null);  

          folderClosedIcon: ClassReference(null);

          folderOpenIcon: ClassReference(null);  





      I have a class MyAdvDataGrid extends FooterAdvancedDataGrid, which extends AdvancedDataGrid implements IFooterDataGrid.

      In a MXML file, I use MyAdvDataGrid component as <adg:MyAdvDataGrid...../>

      It worked fine when in flex 3, but in flex 4, it seems the styles are not inherited from AdvancedDataGrid. Anything wrong with the migration?


      Another thing that confuses me is the namespace. For example AdvancedDataGrid is in package mx.controls, do I have to define the namespace as "mx.controls.*", or I can use the @namespace mx "library://ns.adobe.com/flex/mx" namespace and with mx|AdvancedDataGrid?  mx|AdvancedDataGrid has no warning in the flashbuilder, but for example, mx|AdvancedDataGridBaseEx has "Cannot resolve namespace qualified type 'AdvancedDataGridBaseEx' in CSS selector 'AdvancedDataGridBaseEx'" warning, is that ok?


      Currently, in my css file, I defined the following namespaces, is it necessary to do so?

      @namespace advancedDataGridClasses "mx.controls.advancedDataGridClasses.*";
      @namespace dataGridClasses "mx.controls.dataGridClasses.*";
      @namespace s "library://ns.adobe.com/flex/spark";
      @namespace mx "library://ns.adobe.com/flex/mx";
      @namespace controls "mx.controls.*";
      @namespace dividedBoxClasses "mx.containers.dividedBoxClasses.*";
      @namespace core "mx.core.*";
      @namespace listClasses "mx.controls.listClasses.*";
      @namespace skin "mx.skins.halo.*";
      @namespace scrollClasses "mx.controls.scrollClasses.*";
      @namespace sliderClasses "mx.controls.sliderClasses.*";
      @namespace container "mx.containers.*";