SmartBindingSource CustomControlTypes
 
Forums / SmartComponent Library - Developer Forum / SmartBindingSource CustomControlTypes

SmartBindingSource CustomControlTypes

3 posts, 0 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    20 Apr 2020
    Link to this post
    When using the "Add Fields" verb, controls are added to the form based on the DataType. I am looking for a way to add the control I want. For example, an INTEGER, DECIMAL and INT64 will use the UltraNumericEditor. I would prefer to use the UltraMaskedEditor as well as use my own properties for the control. What is the easiest way of doing this besides adding an OVERLOAD to CreateControlForField in my BindingSource?

    I noticed in the source there is a property called CustomControlTypes but can find much documentation on this.
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    20 Apr 2020 in reply to Roger Blanchard
    Link to this post
    To utilitze the custom control types, you need to use an extended SmartBindingSource (through inheritance). 

    In the Constructor, you could

    THIS-OBJECT:CustomControlTypes:Add (Progress.Data.DataType:CHARACTER, "full type name with package of desired control") .
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    20 Apr 2020 in reply to Mike Fechner
    Link to this post
    Perfect..thank you.
3 posts, 0 answered