Implementing a Spinner (eg Up/Down) as custom cell type

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

  • Posted 8 September 2017, 12:41 pm EST

    Hello all,


    I'm thinking about implenting a custom cell type to handle a spinner. It seems that I should inherit from NumberCellType to get all of the number stuff built into that cell type. Am I on the right track or is there a better way to do this. Following are some specific questions pertaining to the above: 

      A. How do I turn off the PopUp Calendar feature since I do not want that
    B. How would I go about getting my grapic to display in the cell properly
    C. I think I would need to override IsReservedLocation - How would I
    determine whether I am in the top or bottom half of the graphic area and
    how would I determine how wide the graphic area is
    Thanks in advance for any ideas and/or suggestions!


     


     

  • Replied 8 September 2017, 12:41 pm EST

    j2 -

    Why not just use the NumberCellType and use the built-in spin button?
  • Replied 8 September 2017, 12:41 pm EST

    Even better, I will do so. I looked through the list expecting it to be a separate cell type by itself. Thanks!
  • Replied 8 September 2017, 12:41 pm EST

    To better help me understand creating my own custom cell type, let's say the Spinner wasn't available. How would I go about coding the questions posed above? Thanks!
  • Replied 8 September 2017, 12:41 pm EST

    Hello,


    This should be rather simple to implement. If you notice that our spinner does not show until you enter editmode on the cell. This fires the GetEditorControl override of your CellType to get the editor used in the control. All our edit celltypes use the FarPoint.Win.Spread.CellType.GeneralEditor control as the editor. This control has a ButtonStyle property that can be set to Spin.

Need extra support?

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

Learn More

Forum Channels