Announcement

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

    Removing "Loading data..." and "No items to show" text from grid

    We have removed the Smart GWT standard "Contacting Server" and other informational popups from our grid and are pleased with the results. However, the grid still displays text messages such as "Loading data..." and "No items to show". Our old grids used to display in-grid images during data load and we'd like to replicate that. How can we replace the text messages with an image?

    #2
    The messages are HTML, so you can put an "<img src..." in them.

    However note that an enhancement is scheduled to include a spinner image along with the text message - no ETA for this.

    Comment


      #3
      Thanks for the response. Where exactly should we place the message? Is there a java method we can call to set this property accordingly? (i.e. to HTML). For example, we used the method ShowPrompt to hide the "Connecting to Server" popup messages.

      Comment


        #4
        See ListGrid.setLoadingMessage(), setEmptyMessage().

        Comment


          #5
          That worked like a charm, thank you!

          Comment


            #6
            Sorry to keep rehashing, but this works great for all of our grids but one. We have one grid that has frozen columns. Our custom loading message appears in both the frozen side of the grid and the unfrozen side. Is there a way to have the message appear in one side of the grid but not the other?

            Comment


              #7
              Currently, there's not really a clean way to do this short of detecting the empty/loading cases yourself and adding your own, additional child that you place above the frozen and normal body children when the grid is empty or loading. As a cosmetic enhancement, we may do something like this in the future - no ETA for this, sorry.

              Comment


                #8
                SetEmptyMessage() works fine with ListGrid , is there any way by which I can remove this message from ComboBox.
                In comboBox if I enter "abc" and there is no item in the list to start with "abc" then it shows an empty dropdown and the text "No Items to show", how can I remove this text ?

                Comment


                  #9
                  You should be able to use 'setPickListProperties' to customize the drop down list shown by the ComboBoxItem (including customizing the empty message).

                  Comment


                    #10
                    @btcarelli,
                    how did you manage to remove contacting server message?
                    @Isomorphic,
                    is there any way to change and style the contacting server message component?

                    Thanks.

                    Comment

                    Working...
                    X