3 Replies Latest reply on Mar 22, 2011 3:26 PM by Flex harUI

    Remove DataGrid Header Separator dynamically

    Bhargav_Flex

      Hello,

       

      Scenario: I have a DG with 3 static columns and many dynamic columns added at run time.

      I want to have one and only one header for all the dynamic columns.

      In a way it can be seen as multiple datagridColumns (without headers) in  a single dataGridColumn (with only a header). Now there is a heavy traffic between static columns and the dynamic columns. So I dont think it is possible to have two different DG's.

       

      My Attempts: I tried to use the HeaderSeparatorSkin to remove the header separators so as to give a feel of one single header. But since the headerseparatorskin is removed at DG level it can be either removed for all columns or for none.

       

      My Question: I will have to create a custom DG so as to draw separator skin for few columns and remove for others. But I am not sure how can I do that since using "headerSeparatorSkin" removes it for all columns. Can some one show me a path as to how I can accomplish this?

       

       

      A very bad way of accomplishing the above is to remove all the header separator skins and then use headerRenderer for the static columns to show a line similar to separator skin. But that is a bad way of coding I guess.

       

      Thanks in advance,

       

      Bhargav