Invisible Grid

Posted by: hpadmasola1 on 8 September 2017, 2:18 pm EST

  • Posted 8 September 2017, 2:18 pm EST

    Hi, I want my data to neatly formatted as in a grid but I dont want the grid to be visible. (Plain headings with no background, no gridlines, no scroll bars.. etc). Is there a easy way to do this ?


    Harish

  • Replied 8 September 2017, 2:18 pm EST

     Hello Harish,

    You can try creating a SpreadSkin such that it doesn't show the GridLines in the DataArea along with setting other properties accordingly and apply it to Spread.

    However, to avoid having scroll bars in the Spread you can use HorizontalScrollBarPolicy and VerticalScrollBarPolicy to Never.

    To hide the GridLines of Column and Row Header, you can try creating a GridLine object such that GridLineType is set to None and then set it as the ColumnHeader's and RowHeader's HorizontalGridLine and VerticalGridLine.

    Code for the same is given below :

                FarPoint.Win.Spread.SheetSkin skin = new FarPoint.Win.Spread.SheetSkin("TestSkin", Color.White, Color.White, Color.Black,
                Color.Transparent, FarPoint.Win.Spread.GridLines.None, Color.White, Color.Black, Color.White, Color.Black, Color.White, Color.White,
                true, true, false, true, true);
                skin.Apply(fpSpread1);
                fpSpread1.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never;
                fpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never;
                fpSpread1.BorderStyle = BorderStyle.None;
               
                FarPoint.Win.Spread.GridLine gdln = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None);
                fpSpread1.ActiveSheet.ColumnHeader.HorizontalGridLine = gdln;
                fpSpread1.ActiveSheet.RowHeader.HorizontalGridLine = gdln;
                fpSpread1.ActiveSheet.ColumnHeader.VerticalGridLine = gdln;
                fpSpread1.ActiveSheet.RowHeader.VerticalGridLine = gdln;

     Hope it will help you. Thanks.

     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels