Announcement

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

    cell padding doesn't seem to work on ListGrid

    The data in my ListGrid columns is too tight to each other. No matter what value I set for cellPadding, it doesn't seem to matter. Should this actually be done via custom styling?

    #2
    Correct, cell padding is controlled via CSS styling in the grid, not the cellPadding attribute.

    Comment


      #3
      I think the documentation should then be altered, because that mentions cellPadding as a valid attribute for a grid, even the code shows it is, but it isn't working.

      If I were to do it with a class how can I set it for the whole grid? I now set the styling via
      Code:
      .listTable td {
        padding: 5px;
      }
      (Thus using the table's class name generated by SmartClient itself).
      Last edited by wallytax; 16 Oct 2014, 12:24.

      Comment


        #4
        The cellPadding is applied, the thing is, any padding in the CSS overrides it, so that's where you should generally apply padding.

        Modify per-cell styling via listGrid.baseStyle.

        Do not use selectors like you are attempting; that relies on an assumption that all the TDs we generate happen to be ones you want to style (not the case).

        Comment


          #5
          I tried to set the base style, but then I need to specify the full style for the columns based on the original theme, or not? At least when I changed the base style the whole grid looked different.

          Comment

          Working...
          X