Announcement

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

    Cube Grid Header Titles getting truncated

    Hello,

    We are using SmartGwt version 6.0.20170108p.
    We are setting these two properties for Cube Grid Headers but still the headers are truncated when rendered.
    cubeGrid.setAutoFitHeaderHeights(true);
    cubeGrid.setWrapHeaderTitles(true);

    Wrapping Header title is a requirement.
    Please refer to the attached screenshots for the issue.
    Attached Files

    #2
    For vertical truncation in the row headers (left hand side of the data area), set autoSizeHeaders. Consider also rowHeaderGridMode.

    The ListGrid setting autoFitHeaderHeights and wrapHeaderTitles does not apply to CubeGrids, which have a very different header structure, with multiple different types of headers.

    Use wrapFacetTitles and wrapFacetValueTitles to control wrapping of titles in headers.

    See facet.labelHeight if you need to make individual facets have taller headers for their values.

    Comment


      #3
      Hi guys,
      We are facing a similar situation where the cubegrid titles are truncated. We have tried all options without success :

      cubeGrid.setAutoFitData(Autifit.BOTH);
      cubeGrid.setAutoSizeHeaders(true);
      cubeGrid.setWrapFacetTitles(true); //tried both True/False
      cubeGrid.setWrapFacetValueTitles(true); //tried both True/False
      cubeGrid.setCanAdaptWidth(true); // tried both True/False

      tried also with the option :
      cubeGrid.setRowHeaderGidMode(true);

      None of the changes has made a difference on Facet titles display as you can see in the attachment. The only way to have larger titles field was to fix the Facet width - it would be much better if the facet width adapts to the content.

      What is the right option to use to have dynamic column width on cube grid. Is there any know issue or limitation ?

      Thank you !
      Attached Files

      Comment


        #4
        See previous response (and docs): these options configure vertical auto-sizing in the row headers. There is currently no option to enable auto-sizing of column headers; if you need this, you can measure your titles via offscreen drawing and then apply widths. Or, if you prefer, consider Feature Sponsorship to have a new feature added.

        Comment


          #5
          Hi again, it is a shame that the column width doesn't adapt to its content. Measuring the titles (and the content of the column) via offscreen is not a solution that we are considering now... unless you have a working example for that ?
          It is definitely a feature to add to the upcoming versions. How can we sponsor it ?

          Last question, our experience with the cubegrids shows that they are not responsive - we were not able to have the width of the cube grid adapts to the width that is offered to it. Is there any possibility to have this behavior with one of the existing features ? That would also solve our issue with the titles being truncated.

          Thanks again for your answers
          Last edited by Amben; 4 Jul 2017, 07:06.

          Comment


            #6
            If you assign a percent width to a CubeGrid it will take available space.

            The sponsorship would essentially involve upgrading the component to do offscreen rendering to measure titles, similar to what we recommended to you. To get started with possible sponsorship, use the Contact page and ask for a quote. Be as detailed in your requirements as possible.

            Comment


              #7
              Hi guys,

              the CubeGrid is not being very friendly in terms of UI management.

              Setting the cubegrid.setHeight("80%"); // Works well
              Setting the cubegrid.setWidth("80%"); // Doesn't give any results - despite several tests - see screenshot

              I am happy to explore the option with measuring the titles or windows but do you have an example ?

              Thanks again
              Attached Files

              Comment


                #8
                The CubeGrid will not use additional width beyond what's needed to render the configured columns. Since columns don't autosize and you haven't given larger than the default widths to the columns, there is nothing for the cube to render in the blank space you show in your screenshot.

                Offscreen rendering for measurement is a general technique, not something we show in a sample. You would, for example, place a Canvas at negative top coordinates (to place it offscreen), place the content to measure as Canvas.contents (being sure to match styling), draw the Canvas and look at getVisibleWidth()/Height().

                Comment


                  #9
                  Does it mean that we would potentially need to build the cubegrid twice, once not visible in the canvas and the second one with the right columns width and visible ?

                  Comment


                    #10
                    Why would you do that?

                    Do the offscreen measurement first, then create the cube.

                    Comment

                    Working...
                    X