Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SimpleType alignment when using inhertitsFrom "ANY"

    Hi,

    For our simpleTypes, the alignment should be different then in a form.
    Currency amounts should be right aligned, dates left, etc.

    I thought that doing this would be pretty straight forward and that I would just had to set a default alignment on our simpletype, so that this would be taken over in the grid. Seems I was mistaken.

    Then it came to me that probably when you inherit from the build in types (boolean, float, etc.) this behavior is taken over.

    However, because all our simple types are inheriting from "ANY"
    see this post why: http://forums.smartclient.com/showth...t=12044&page=3.
    We can't set any default 'styling' behavior?

    Is there any way that we can bypass this...

    Regards,
    Bart
    Last edited by bade; 25 Mar 2011, 06:00.

    #2
    How are you trying to set alignment, and in what specific component are you not seeing an effect?

    Comment


      #3
      Maybe I should rephrase my question:

      How can you change the alignment in a simpleType, when inheriting from "ANY".

      We want to change the alignment in a Grid only.
      We are using generated (server) datasources.

      Regards,
      Bart

      Comment


        #4
        Currently you need to specify alignment on the ListGridField definition rather than on the SimpleType object. We'll look at what's involved in specifying default alignment on the SimpleType directly.

        Comment


          #5
          Any news on this?

          It would be great to have both Alignment options (header + cell) on the simpleType.

          Regards,
          Bart

          Comment


            #6
            It's a good idea for an enhancement and we plan to add it, probably after next release. In the meantime, there's still the general strategy of enhancing the databinding system by adding logic to components to change defaults on fields.

            Comment


              #7
              Any news on this 3 years later?

              Comment


                #8
                It continues to be an unusual edge case that an alignment setting would make sense on SimpleType, which is a cross-component definition.

                Note that components already use the most commonly needed alignments for various data types (eg most components will render numeric values right-aligned by default).

                Comment


                  #9
                  meaning that field length can only be specified on the ListGridField and not on the SimpleType?

                  Comment


                    #10
                    You can set length via DataSourceField, which means you can set it on a SimpleType via SimpleType.fieldProperties.

                    Comment

                    Working...
                    X