Announcement

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

    TreeGrid name column center aligned in 15.0d

    Hi,
    While testing upgrade to SmartGWT 15.0d I noticed that TreeGrid name field is center aligned instead of left aligned as it used to be 14.1p and earlier versions.
    Here is the test case:
    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.types.TreeModelType;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.tree.Tree;
    import com.smartgwt.client.widgets.tree.TreeGrid;
    import com.smartgwt.client.widgets.tree.TreeGridField;
    import com.smartgwt.client.widgets.tree.TreeNode;
    
    public class MainEntryPoint implements EntryPoint {
    
        public void onModuleLoad() {
    
            layout();
            SC.showConsole();
        }
    
        private void layout() {
            TreeGrid testTreeGrid = new TreeGrid();
            testTreeGrid.setWidth(300);
            testTreeGrid.setHeight(300);
    
            TreeGridField nameField = new TreeGridField();
            nameField.setCanFilter(true);
            nameField.setName("name");
    
            TreeGridField seqField = new TreeGridField();
            seqField.setName("seqIndex");
            seqField.setHidden(true);
            testTreeGrid.setFields(nameField, seqField);
    
            Tree tree = new Tree();
            tree.setModelType(TreeModelType.PARENT);
            tree.setNameProperty("name");
            tree.setOpenProperty("isOpen");
            tree.setIdField("nodeID");
            tree.setParentIdField("parentNodeID");
            tree.setRootValue("root");
            tree.setShowRoot(false);
    
            TreeNode[] appMenu = new TreeNode[2];
            appMenu[0] = new TreeNode("Folder test");
            appMenu[0].setIsFolder(true);
            appMenu[1] = new TreeNode("Test");
            appMenu[1].setIsFolder(false);
            tree.setData(appMenu);
            testTreeGrid.setData(tree);
    
            testTreeGrid.draw();
        }
    }
    and 15.0d output is:
    Click image for larger version

Name:	TreeGrid_align_v15.png
Views:	34
Size:	3.9 KB
ID:	277111
    while 14.1p output is:
    Click image for larger version

Name:	TreeGrid_align_v14.png
Views:	25
Size:	4.0 KB
ID:	277112
    Any fix or workaround for this?
    Thanks,
    MichalG

    #2
    This looks like a bug that was introduced and then fixed last week. Can you get the latest and confirm?

    Comment


      #3
      Latest is still 15.0d 2026-02-06 (and this one has the issue).
      As soon as new one would by published, I will try it.
      Thanks,
      MichalG

      Comment


        #4
        New versions of 15.0d hasn't been published since 2026-02-06.
        Is something stuck?
        Thanks,
        MichalG

        Comment


          #5
          >This looks like a bug that was introduced and then fixed last week. Can you get the latest and confirm?
          Tested against 15.0d 2026-02-19 and this bug still exists.
          Thanks
          MichalG

          Comment


            #6
            Apologies, it was indeed a 15.0-only regression, which is now fixed. Please retest with tomorrow's build.

            Comment


              #7
              Just tested with 15.0d/LGPL/2026-02-27 and still see the issue.
              MichalG

              Comment


                #8
                You can see that the online Showcases (running on yesterday's build) do not have a problem.

                We've actually made no further changes since the build you're using, so you shouldn't see a problem with your test case and we don't.

                Regardless, we'll need a test case that reproduces the problem on the latest build if you're still having trouble.

                Comment


                  #9
                  This is strange, because I still have menu titles centered:
                  Click image for larger version

Name:	TreeGrid_align_v15_2026-03-03.png
Views:	0
Size:	5.7 KB
ID:	277213

                  I just print sgwt version as titles and no other changes comparing to my original example:
                  Code:
                  import com.google.gwt.core.client.EntryPoint;
                  import com.smartgwt.client.Version;
                  import com.smartgwt.client.types.TreeModelType;
                  import com.smartgwt.client.util.SC;
                  import com.smartgwt.client.widgets.tree.Tree;
                  import com.smartgwt.client.widgets.tree.TreeGrid;
                  import com.smartgwt.client.widgets.tree.TreeGridField;
                  import com.smartgwt.client.widgets.tree.TreeNode;
                  
                  public class MainEntryPoint implements EntryPoint {
                  
                      public void onModuleLoad() {
                  
                          layout();
                          SC.showConsole();
                      }
                  
                      private void layout() {
                          TreeGrid testTreeGrid = new TreeGrid();
                          testTreeGrid.setWidth(300);
                          testTreeGrid.setHeight(300);
                  
                          TreeGridField nameField = new TreeGridField();
                          nameField.setCanFilter(true);
                          nameField.setName("name");
                  
                          TreeGridField seqField = new TreeGridField();
                          seqField.setName("seqIndex");
                          seqField.setHidden(true);
                          testTreeGrid.setFields(nameField, seqField);
                  
                          Tree tree = new Tree();
                          tree.setModelType(TreeModelType.PARENT);
                          tree.setNameProperty("name");
                          tree.setOpenProperty("isOpen");
                          tree.setIdField("nodeID");
                          tree.setParentIdField("parentNodeID");
                          tree.setRootValue("root");
                          tree.setShowRoot(false);
                  
                          TreeNode[] appMenu = new TreeNode[2];
                          appMenu[0] = new TreeNode(Version.getVersion());
                          appMenu[0].setIsFolder(true);
                          appMenu[1] = new TreeNode(Version.getSCVersionNumber());
                          appMenu[1].setIsFolder(false);
                          tree.setData(appMenu);
                          testTreeGrid.setData(tree);
                  
                          testTreeGrid.draw();
                      }
                  }
                  Thanks,
                  MichalG

                  Comment

                  Working...
                  X