2 Replies Latest reply on Jul 13, 2011 9:43 AM by kevinklin

    Remove separator from columns and row in spark DataGrid

    mikmiki Level 1

      Capture.PNG

      Hi,

      trying to search a bit on teh web with no success- how do i remove/ handle visibilty of the separators of the columns and rows in datagrid of spark flex 4.5

      see pic with separators:

        • 1. Re: Remove separator from columns and row in spark DataGrid
          Flex harUI Adobe Employee

          The separators are defined in the skin, IIRC.

          • 2. Re: Remove separator from columns and row in spark DataGrid
            kevinklin Adobe Employee

            Two ways:

             

            1) Write a simple custom skin like the following (the empty rects will cause the separators to disappear):

            <?xml version="1.0" encoding="utf-8"?>
            <skins:DataGridSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
                            xmlns:s="library://ns.adobe.com/flex/spark" 
                            xmlns:mx="library://ns.adobe.com/flex/mx"
                            xmlns:skins="spark.skins.spark.*">
                
                <fx:Declarations>
                    
                    <fx:Component id="columnSeparator">
                        <s:Rect/>
                    </fx:Component>
                    
                    <fx:Component id="rowSeparator">
                        <s:Rect/>
                    </fx:Component>
                    
                </fx:Declarations>
                
            </skins:DataGridSkin>
            

             

            2) Make a copy of the default DataGridSkin and remove the "columnSeparator" and "rowSeparator" skin parts.

             

            -Kevin