How do i get a strongly typed cell?

Posted by: parez81-fp on 8 September 2017, 1:06 pm EST

  • Posted 8 September 2017, 1:06 pm EST

    How do i do the following

    CheckBoxCell cell= fpSpread1_Sheet1.Cells[i, 0] as Checkboxcell;

  • Replied 8 September 2017, 1:06 pm EST

    There is no Checked property on the CheckboxCellType.  The easiest thing to do would be to just query the value of the cell and it will return either 1 or 0, depending on its check state.

    If you want you can also use the EditModeOn event and query the EditingControl and if it returns an FpCheckBox then you can then query the Checked property.
  • Replied 8 September 2017, 1:06 pm EST

    You can't do that with a Cell object, but you can with a CellType:

    CheckBoxCellType checkBox = fpSpread1_Sheet1.Cells[i,0].CellType as CheckBoxCellType;
Need extra support?

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

Learn More

Forum Channels