Announcement

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

    #16
    Thanks for the fix on that position issue of the context menu.


    For the gap for that header menu button: we also have issues with autoFit on a grid, and when the sorting icon and sorting order number are added, the body of the grid isn't adjusted with the header. So the header column and grid body column are not aligned anymore (happens on columns where the title is larger than the data).
    So if that fix could think of: header menu button width, sort icon, sort order number (and maybe other icons which can be added there that I don't know of)?

    Comment


      #17
      Noted - we'll take a look

      Comment


        #18
        Both these issues should be resolved for you in the next 3.0 nightly build (Oct 13 or greater).
        Let us know if you continue to see them

        Regards
        Isomorphic Software

        Comment


          #19
          Thanks a bunch, guys!

          Tested on SmartGWT 3.0 SC_SNAPSHOT-2011-10-19

          1) context menu left click is showing up correctly on grid headers placed at the bottom of the browser. FIXED OK
          2) I now see a gap where the context button should appear. FIXED OK
          3) With SHIFT+LEFT CLICK on some grid fields, the column is made larger/smallert when adding/removing the sort. FIXED OK



          While playing with these fixes, I got 2 uncaught JavaScript errors which were the same (this.grid.getField(_4) is null). I can't get more info from where or why I got it, or even how to reproduce it in my app.
          Code:
          WARN:Log:TypeError: this.grid.getField(_4) is null
              GridBody._rowClick(1, -2) @ app/sc/modules/ISC_Grids.js:906
              GridRenderer.click(event=>{Obj}, eventInfo=>undef) @ app/sc/modules/ISC_Grids.js:829
              Canvas.handleClick(_1=>{Obj},  _2=>undef) @ app/sc/modules/ISC_Core.js:3227
              [c]EventHandler.bubbleEvent(_1=>{Obj},  _2=>"click") @ app/sc/modules/ISC_Core.js:1655
              [c]EventHandler.handleClick(_1=>{Obj}) @ app/sc/modules/ISC_Core.js:1495
              EventHandler._handleMouseUp([object MouseEvent], undef) @ app/sc/modules/ISC_Core.js:1482
              [c]EventHandler.handleMouseUp(_1=>[object MouseEvent]) @ app/sc/modules/ISC_Core.js:1473
              [c]EventHandler.dispatch(_1=>isc_c_EventHandler_handleMouseUp,  _2=>[object MouseEvent]) @ app/sc/modules/ISC_Core.js:1718
              anonymous([object MouseEvent]) @ app/sc/modules/ISC_Core.js:60
              unnamed() @
          It shows up as a warning in the dev console, but as an uncaught js in the Eclipse console in dev mode.

          I'll have a deeper look, unless you can figure it out already with this stacktrace :) ?

          Comment


            #20
            We believe this should be resolved. Take a look with the next nightly build. If you continue to see it, try to get us a reproducible case and we'll take a look.

            Comment


              #21
              Hi,

              on the gap next to the title: some field titles are aligned Center. Those now have more room on their right side, so the title isn't really in the center anymore. Probably because of these changes?

              Comment


                #22
                Noted. We'll take a look.

                Comment


                  #23
                  Hello,

                  I think there is some regression on this:
                  Code:
                  ListGrid grid = new ListGrid();
                  grid.setLeaveHeaderMenuButtonSpace(true);
                  
                  ListGridField field1 = new ListGridField("field1", "This is some title");
                  field1.setAlign(Alignment.CENTER);
                  field1.setAutoFitWidthApproach(AutoFitWidthApproach.TITLE);
                  field1.setAutoFitWidth(true);
                  
                  ListGridField field2 = new ListGridField("field2", "This is also a wide title");
                  field2.setAlign(Alignment.CENTER);
                  field2.setAutoFitWidthApproach(AutoFitWidthApproach.TITLE);
                  field2.setAutoFitWidth(true);
                  
                  
                  grid.setFields(field1, field2);
                  In this sample, I expected that the header menu button would still have some space to show and would not cover the title.
                  If you leave out the alignment on the field (default LEFT), there is space for the menu button.

                  This looks OK on the 'Flag' column (CENTER alignment) in http://www.smartclient.com/smartgwt/showcase/#grid_row_numbering
                  If you manually make that column wider, it first resizes to leave place at the right of the title for the button, and only then it resizes at the left of it.


                  tested with
                  SC_SNAPSHOT-2012-02-01_v8.3d


                  thanks

                  Comment


                    #24
                    Hi,

                    any progress on the CENTER alignment of field titles + keeping a gap for the field context menu button + performing AutoFitWidth?

                    Comment


                      #25
                      We made a change so that fields explicitly given center alignment will remain center-aligned with autofit enabled. See also the new property ListGrid.leaveHeaderMenuButtonSpace for overriding this so that autofitting still leaves space for the header menu.

                      Comment


                        #26
                        Sorry, what is the solution for my case?
                        Because I saw that property and it says it is default true:
                        Code:
                        @param leaveHeaderMenuButtonSpace leaveHeaderMenuButtonSpace Default value is true
                        yet the center aligned titles do not leave some space for the menu button.

                        Comment


                          #27
                          Sorry we don't follow - if room is left for the contextMenu, then the text cannot be centered - unless room is left on *both* sides which seems clearly not desirable.

                          Comment


                            #28
                            When the title is aligned CENTER
                            I would think the default width is calculated by the text title width
                            and add the size of the button (optional via that property).

                            You're right that the title isn't 'really' in the CENTER, but when a user enlarges the column, the title should still stay in CENTER.

                            So when autofitting such a column it would show up as
                            |TITLE[X]| leaveHeaderMenuButtonSpace = true
                            |TITLE| leaveHeaderMenuButtonSpace = false

                            When making the column larger it would be
                            |...TITLE...[X]| leaveHeaderMenuButtonSpace = true
                            |...TITLE...| leaveHeaderMenuButtonSpace = false



                            If you look at this sample
                            http://www.smartclient.com/smartgwt/showcase/#grid_autofit_columns
                            the "Flag" title isn't really in the CENTER (OK)
                            because it leaves some space for the button.
                            If you make that column larger, "Flag" doesn't stick to the left side (OK), because it's CENTERED.

                            Doing the same with the code in first post, I don't see that initial behaviour where the columns still leave some space for the button, even though the property is set true.

                            Comment


                              #29
                              Ah- we were looking at the wrong branch - this works already in 3.0p but not 3.1d.
                              We've now fixed this. Please try the next nightly build.
                              FYI what's changed:
                              - the property is now unset by default. If unset we leave the gap for fields that are left or right aligned but not for center-aligned fields
                              - you can override this by explicitly setting the property at the grid level to true or false (and we've also added support for setting the property per field should you so desire)

                              Should show up in the next (March 10 or greater) nightly build

                              Comment

                              Working...
                              X