Posted by: jvjvjv on 8 September 2017, 3:12 pm EST

  • Posted 8 September 2017, 3:12 pm EST


    AutoSort,AutoFilter couldn't show when i set ColumnHeader.DefaultStyle.Render= GeneralCellType (i set sortindicator , but not work properly)

    Border Line is Created when i set ColumnHeader.DefaultStyle.Render= ColumnHeaderRenderer

    Some BackColor is setting default when i set ColumnHeader.DefaultStyle.Render= nothing

    i want autosort,autofilter, no border line, no backcolor.. what to do? can u help?
  • Replied 8 September 2017, 3:12 pm EST


    You can use the following code to hide the borders/gridlines in the ColumnHeader and RowHeader Cells and to reset its Backcolor to transparent, however still showing the sort and thefilter indicators:

    fpSpread1.ActiveSheet.Columns[0].AllowAutoFilter = true;
    fpSpread1.ActiveSheet.Columns[1].AllowAutoSort = true;
    fpSpread1.Sheets[0].VisualStyles = FarPoint.Win.VisualStyles.Off;
    fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.ColumnHeaderRenderer();
    fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.BackColor = Color.Transparent;
    fpSpread1.ActiveSheet.RowHeader.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.RowHeaderRenderer();
    fpSpread1.ActiveSheet.RowHeader.DefaultStyle.BackColor = Color.Transparent;
    FarPoint.Win.Spread.GridLine rgdln = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None);
    FarPoint.Win.Spread.GridLine cgdln = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None);
    fpSpread1.Sheets[0].ColumnHeader.HorizontalGridLine = cgdln;
    fpSpread1.Sheets[0].RowHeader.HorizontalGridLine = rgdln;
    fpSpread1.Sheets[0].ColumnHeader.VerticalGridLine = cgdln;
    fpSpread1.Sheets[0].RowHeader.VerticalGridLine = rgdln;

    Please refer to the attached screenshot that depicts the output at my end. Hope it helps. Please let me know if you are referring to something else. In this scenario please share some screenshots describing your exact requirement, so that I can accordingly guide you ahead with this issue.

    Manpreet Kaur

  • Replied 8 September 2017, 3:12 pm EST

    Hi ,

    I did as per ur post.. But its not working property. i attached what i am expecting..i want to remove the border. i marked by rectangle,

  • Replied 8 September 2017, 3:12 pm EST


    I apologize for the delayed response I am not quite sure how exactly are you setting the Renderer for the Column header. Please refeer to the attached sample that implements the code defined and is working correctly.

    Could you please modify the attached sample to depict your issue so that I can replicate the issue at my end and accordingly guide you ahead with the same.

    Manpreet Kaur
Need extra support?

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

Learn More

Forum Channels