Are you able to put a formula in a columnheader. I am not able to get this to work?
This is not supported.
While we don’t support formulas in column header cells, you could put the formulas in the first row and make it a frozen (fixed) row and then hide the column header row, making the first row appear as if it is the header.
I’m pretty sure that should work, but I’m trying it out in code and its not correctly setting the formula in the column header. I have submitted this to the developers to look into, and I will get back to you.
The way that Spread WinForms V10 is currently implemented, we only support the formula working internally in column headers, and not being able to refer to the sheet data area. However, you can make it work using some hidden API. Keep in mind that this will not be supported after V11. In the meantime, you can using something like the following code:
FarPoint.Win.Spread.ColumnHeader ch; ch = fpSpread1.ActiveSheet.ColumnHeader; ch.RowCount = 2; fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 0].Value = 2; fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 1].Value = 3; ((DefaultSheetDataModel)fpSpread1.ActiveSheet.Models.ColumnHeaderData).SetFormula(1, 0, "SUM(A1:B1)");// Notice: A1:B1 belongs to the column header // This API is marked as internal, it is not meant for public use ((DefaultSheetDataModel)fpSpread1.ActiveSheet.Models.Data).ShareCalculations(fpSpread1.ActiveSheet.Models.ColumnHeaderData as DefaultSheetDataModel); ((DefaultSheetDataModel)fpSpread1.ActiveSheet.Models.ColumnHeaderData).SetFormula(1, 1, "SUM(Sheet1!A1:A5)"); fpSpread1.ActiveSheet.Cells[0, 0].Value = 1; fpSpread1.ActiveSheet.Cells[1, 0].Value = 3;
The developers are going to work on integrating that behavior into ColumnFooters. If it is successful, they can look into using it for other areas like ColumnHeaders and RowHeaders.
In reference to your JS question, looks like you already have a response in that respective forum:
You must be logged in to create new topics.