Special Progress cell type

Posted by: c12008 on 8 September 2017, 3:10 pm EST

  • Posted 8 September 2017, 3:10 pm EST

    Hi, I want to create a special cell type displaying a circular progress within a cell. There is no editing required. I have a winforms usercontrol working fine and I want to show this one within a cell.
    I´ve create several custom cell type, but they all have a subeditor and display only the value of the subeditor in the cell. But now I want to show no text or numbers etc. in the cell. I want the usercontrol to be shown within the cell even if the cell does not have the input focus.
    I´ve tested a little bit with a custom cell type derived from ICellType but did´nt have any success.
    Any ideas about that?

    A code sample would be very nice.
    I´m using fp spread v6.

    Best regards
    csd1304
  • Replied 8 September 2017, 3:10 pm EST

    Hello,

    You need to be careful when trying to move a control over the Spread.. The PaintCell method should be used for painting objects into the graphics layer provided by the override.

    However, you may try setting the Parent property of the UserControl to the Spread.

    userctl1.Parent = FpSpread1

    If that doesn't help then you should be able to use the UserControl in a Cell using custom cell type.
    With custom cell types you can Override the PaintCell method to write code to render what you want in a cell. You would override GetEditorControl method to return an instance of your user control to use it as the editor.

    Please have a look at these posts for the same:-
    http://www.clubfarpoint.com/Forums/forums/thread/86235.aspx
    http://www.clubfarpoint.com/Forums/forums/thread/111052.aspx

    Hope it helps. Else please send us the stripped out sample replicating the issue. We will proceed on the same thereon.

    Thanks,
    Reeva
  • Replied 8 September 2017, 3:10 pm EST

    Hi,

    well I don´t to move a control over the spread. I want to create a celltype containing this control. So if I assign this celltype to a specific cell, this cell just shows the control within its cell area (e.g. like a checkbox celltype does), without being in edit-mode, because I do not want to edit this cell - it should be a display only - displaying my control.

    I´ve created several custom celltype, but all of them use a cell editor for editing the cell value. And in all of this cases the cell itself just shows the current value. All these custom celltype are derived from ICellType. And that´s what I´ve tried here too. But I have no idea how to use (and what for) all the methods and properties of that interface to work properly for the decribed case.

    So I would appreciate an example creating a custom celltype displaying e.g. a windows forms panel (with for example a special background color) but with no cell editor.

    Best regards
    csd1304
  • Replied 8 September 2017, 3:10 pm EST

    Hi,

    well I don´t to move a control over the spread. I want to create a celltype containing this control. So if I assign this celltype to a specific cell, this cell just shows the control within its cell area (e.g. like a checkbox celltype does), without being in edit-mode, because I do not want to edit this cell – it should be a display only – displaying my control.

    I had a look at the posts you told me, but all of these examples have a subeditor, but that´s not my case.

    I´ve created several custom celltype, but all of them use a cell editor for editing the cell value. And in all of this cases the cell itself just shows the current value. All these custom celltype are derived from ICellType. And that´s what I´ve tried here too. But I have no idea how to use (and what for) all the methods and properties of that interface to work properly for the decribed case.

    So I would appreciate an example creating a custom celltype displaying e.g. a windows forms panel (with for example a special background color) but with no cell editor.

    Best regards
    csd1304
  • Replied 8 September 2017, 3:10 pm EST

    Hello,

    Please have a look at the attache sample wherein we have created custom celltype from ProgressBar and it is then shown inside a Spread cell. This custom celltype is non editable as well.


    Hope it helps.

    Thanks,
    Reeva

    2013/08/CustomProgressBar_ContainedInSpreadCell.zip
Need extra support?

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

Learn More

Forum Channels