Announcement

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

    Need help in Listgrid cell content alignment

    In our project we have a tree grid and list grid, in which user can edit data. Problem is when user gives more than one space between words it trimming that space and showing single space. But when we try to edit same content again it will shows content without trimming spaces (it will show only in edit mode)

    See the attached image file with name inEditMode.JPG.

    When we come back to normal mode(unedited mode) after editing content, it showing single space between words

    See the attached image file with name inNormalMode.JPG.

    We want that content will be same format as user enter. Is there any way to get this behavior?

    We have one more issue; in our project we are displaying image and data in list grid in single cell, the content aliened at the top border of the image

    See the attached image file with name topalign.JPG

    But we want the content will be align at the bottom of the image and it will be center of cell

    See the attached image file with name bottomalign.JPG

    Please let us know is there any way to get this behavior
    Attached Files

    #2
    First issue: when the cell content is display in non-editmode it is interpreted as HTML, which ignores multiple spaces. Setting escapeHTML on the field (at the DataSource level is usually best) will cause the text to be rendered literally instead of as HTML markup.

    Second issue: we'd need to see how you are causing the icon and text to be displayed (CellFormatter? ValueIcons? Something else?) in order to comment.

    Comment


      #3
      Thanks for your quick reply .

      First Issue: SetescapeHTML () method is working for list grids , but we want to apply same property to Tab title also. Why because we need to allow multiple space between words in tab title .

      In tab I didn’t find any method relative to this property or any other way ,If it is there please let as know .


      Second issue: In this case we are we are setting image in two ways, for some list grids we are adding in Datasource transformResponse and in some grids in DataArrivedHandler .

      Comment


        #4
        If you need to programmatically escape HTML that is not a record value, use SafeHtmlUtils.htmlEscape().

        Comment


          #5
          In First Issue: we need to allow multiple space between words in Tab title also ,
          using SetescapeHTML () we enable to allow space in listGrid columns. But we want same behavior in Tab tile also,
          is there any way to get this .... ?

          Comment


            #6
            If the GWT utility doesn't give you exactly the escaping you're after you could always do a regexp replace to (for example) map space to   chars.

            Comment


              #7
              Thanks it's working ...

              Comment

              Working...
              X