Announcement

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

    5.1d BatchUploader setGridProperties() API missing

    Hi Isomorphic,

    5.1d BatchUploader is missing setGridProperties(ListGrid gridProperties), analogous to for example ComboBoxItem.setPickListProperties(ListGrid pickListProperties).
    My use case is that I want to set setAutoFitWidthApproach(AutoFitWidthApproach.BOTH) via the properties. Could you add this API?

    I noted that ComboBoxItem has several more API related to its PickList. I don't need those currently, but perhaps you could also add others that make sense in conjunction with BatchUploader.

    Thank you & Best regards
    Blama

    #2
    The grid is an AutoChild, so a dedicated setGridProperties() API is unnecessary. You just use setAutoChildProperties().

    Comment


      #3
      Hi Isomorphic,

      great, thank you. I tried
      Code:
              ListGrid properties = new ListGrid();
              properties.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
              properties.setOverflow(Overflow.SCROLL);
              batchUploader.setAutoChildProperties("grid", properties);
      which does not work for me (no change of display in current 5.1d nightly. Is my code correct? How do I know the name of the AutoChild-Property (I did not work with AutoChilds so far, I only read about it)?

      My goal is to have no ellipsis ("...") in the column headers, but horizontal ListGrid-Scrollbars, if required.

      Best regards
      Blama
      Last edited by Blama; 19 Oct 2015, 13:54.

      Comment


        #4
        Hi Isomorphic,

        Autofitting (and therefore the AutoChild mechanism as well) works with this code as expected when selecting "Auto fit all columns" from the menu:
        Code:
                ListGrid properties = new ListGrid();
                properties.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
                batchUploader.setAutoChildProperties("grid", properties);
        But how do I make it execute this / autofit on load of the .csv data?

        Best regards
        Blama

        Comment


          #5
          You can discover the available AutoChildren on a component by simply searching its documentation for the term "AutoChild" - this would lead you to getGrid() on the BatchUploader, for example.

          Your property setting is working, as you've figured out. But there isn't a static property setting that would cause a grid to re-run autofitting with the way this data is provided to the grid. Instead, you need to use getGrid() and explicitly ask for autofitting after the data is shown.

          Comment


            #6
            OK thank you. I'll do that then.

            For the AutoChilds: "getGrid()" -> "grid"? So the rule is always "remove the 'get' and lowercase the 1st letter"?

            Thank you,
            Blama

            Comment

            Working...
            X