Issue when using a spread inside a cell of another spread

Posted by: eager2knw on 8 September 2017, 1:37 pm EST

  • Posted 8 September 2017, 1:37 pm EST

    Hi,


    I have a parent spread fpspread1 which has a child spread fpspread2


    fpspread2 = ((FpSpreadCellType)(fpspread1 .ActiveSheet.Cells[rowIndex, colIndex].CellType)).cellTypeSpread;


    The code for customcelltype is as follows :


    public class FpSpreadCellType : FarPoint.Win.Spread.CellType.EditBaseCellType


    {


    public FarPoint.Win.Spread.FpSpread cellTypeSpread;


    public override void PaintCell(System.Drawing.Graphics g, System.Drawing.Rectangle r,


    FarPoint.Win.Spread.Appearance appearance, object value,


    bool isSelected, bool isLocked, float zoomFactor)


    {


    if (cellTypeSpread.Visible == false)


    {


    cellTypeSpread.Visible = true;


    }


    cellTypeSpread.Size = new Size(r.Width, r.Height);


    cellTypeSpread.Location = new Point(r.X, r.Y);


    }


    public FpSpreadCellType(FarPoint.Win.Spread.FpSpread spread)


    {


    cellTypeSpread = spread;


    }


    }


     Now I manipulate with the child spread (fpspread2) 


    fpspread2.ActiveSheet.Columns[0].BackColor = System.Drawing.Color.Red;


    But the changes are not reflected Sad


    Where could I have gone wrong?


    Thanks,


    Eager2knw

  • Replied 8 September 2017, 1:37 pm EST

    Are you assigning this custom celltype to the parent spread or do you have two spreads on a form?  Do you have a small project you could attach showing this behavior?
  • Replied 8 September 2017, 1:37 pm EST

    Hi,


    Im using custom celltype to the parent spread


    fpSpread2 = ((FpSpreadCellType)(fpSpread1.ActiveSheet.Cells


    [rowIndex, colIndex].CellType)).cellTypeSpread .


    fpSpread2 .ActiveSheet.Columns[0].BackColor = System.Drawing.Color.Red;


    Now, the changes that I apply to the spread are not reflected.


    Thanks,


    Eager2knw


     


     


     


     


     


     


     


     


     


     

  • Replied 8 September 2017, 1:37 pm EST

    Do you have a small project you could attach showing this behavior?
Need extra support?

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

Learn More

Forum Channels