Create a custom cell type

Posted by: spike on 8 September 2017, 1:19 pm EST

  • Posted 8 September 2017, 1:19 pm EST

    Please provide an example for creating a custom cell type...idea...inherit from number cell type.

     

    We've created a custom cell type based on the numbercelltype named integer cell type.  Decimal places are to be overridden to return zero in the decimal position.  The issue...I'm able to set a decimal place other than zero.

     Thanks for help in advance!
     

  • Replied 8 September 2017, 1:19 pm EST

    Spike -

    Could you elaborate a bit?  Why do you need a custom celltype for this.  The NumberCellType has a DecimalPlaces property that you can set to 0.

  • Replied 8 September 2017, 1:19 pm EST

    Public Shadows Property DecimalPlaces()

    Get

        Return 0

    End Get

    Set

        MyBase.DecimalPlaces = 0

    End Set

    End Property 

  • Replied 8 September 2017, 1:19 pm EST

    This code is working for me.  What version are you using?
  • Replied 8 September 2017, 1:19 pm EST

    Bob...we're in the takenote class.  The problem with this code is it allows entry of decimals other than 0 at run time.  Plus, this is my first exposure to the forums so we thought it a good idea to run this one by you.
  • Replied 8 September 2017, 1:19 pm EST

    Never mind...we've figured out our issue.  We created a custom class and utilized a constructor to set the NumberCellType to zero.  Then changed our property to readonly.  That fixed it!

     

    Thanks 

Need extra support?

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

Learn More

Forum Channels