Bug in 3.0

Posted by: j2associates on 8 September 2017, 12:40 pm EST

  • Posted 8 September 2017, 12:40 pm EST


    We have a couple situations where we use multiple RowHeader colums (eg put a Delete Button in the second column). We put it there because it pertains more to controlling the data. That way only data is in the data area. We then responded to the CellClick event to handle the "event" since the FpSpread does not fire the ButtonClick event in the headers.

    On occasion we simulated a ComboBoxCellType in a similar manner. In version 3.0, if you apply a CellType to a RowHeader column, the underlying data is hidden, even for things like EmptyCellType or GeneralCellType. ButtonCellType, ComboBoxCellType and MultiColumnComboBoxCellType all appear as expected.

    I have attached a small project to demonstrate the issue. When the form is loaded, select a cell type from the radio buttons and then click somewhere on the spread. The requested cell type is loaded into RowHeader column 0 and Data column 1. The clear option sets the respective cell types to Nothing. For combo box cell types, the message box pops and then if you click the drop down arrow again it will be dropped.

  • Replied 8 September 2017, 12:40 pm EST


    This is a bug in the Spread control where using your own CellType object in the header is not painting the text in the cell. This bug should be fixed in the next maintenance release. To reset the CellType back to a celltype that works in the headers, you need to set it to a ColumnHeaderRenderer object.

  • Replied 8 September 2017, 12:40 pm EST

    Thanks, Scott!

    Can you point me to some code that does what you suggest with the ColumnHeaderRenderer object?

    I have noticed that RowHeader column CellTypes can be set to Nothing and will stay that way so that takes care of my current issue as a work-around. This is different from the data area wher if you set a Data CellType to Nothing it is changed to GeneralCellType.

  • Replied 8 September 2017, 12:40 pm EST


    To reset the renderer to be the default renderer, you can use code like the following.

    <FONT size=2>

    FpSpread1.Sheets(0).ColumnHeader.Cells(0, 1).Renderer = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> FarPoint.Win.Spread.CellType.ColumnHeaderRenderer</FONT>

    <FONT size=2><FONT size=3>Or, you can just call the ResetCellType method on the cell in question.</FONT></FONT>

    <FONT size=2><FONT size=2>

    FpSpread1.Sheets(0).ColumnHeader.Cells(0, 1).ResetCellType()

  • Replied 8 September 2017, 12:40 pm EST

    Thank you Scott!
Need extra support?

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

Learn More

Forum Channels