Announcement

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

    Listgrid and smartgwt 6.1


    I've encountered a problem upgrading to version 6.1, when I step over the grid with the mouse pointer I have an annoying resizing of the cells, as if they were shrinking, which did not happen in version 5.1. Are you aware of this problem?

    #2
    No, this is not a problem with the framework, as you can see from the online showcase. You may have external CSS creating this problem, or you may have skipped steps in the upgrade process.

    Comment


      #3
      yes i have comment the override of protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum) and the problem disappear... i don't know why not work...
      you see anything wrong?


      Code:
      public static String getCellCss(ListGrid grid, ListGridRecord record, int rowNum, int colNum)
      {
      try
      {
      if (record != null && record.getAttribute("ETS_AGENDA_PADRE") != null
      && !record.getAttribute("ETS_AGENDA_PADRE").equals(""))
      {
      record.setEnabled(false);
      return "color:grey;";
      }
      
      if (record != null)
      if (record.getAttribute("ETS_CODESITO") != null)
      if (record.getAttribute("ETS_CODESITO").equals(Cc_Err_DeleteUtente))
      {
      
      return "font-weight:bold; color:darkred;";
      }
      
      if (grid.getFieldName(colNum).equals("ETS_STATOMSG"))
      {
      return "font-weight:bold; color:orange;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_DESTMODULO"))
      {
      return "font-weight:bold; color:cyan;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_CODESITO"))
      {
      return "font-weight:bold; color:blue;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_IDPROG"))
      {
      return "font-weight:bold; color:blue;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_CODUTENTE"))
      {
      return "font-weight:bold; color:#006400;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_CODCAUSMG"))
      {
      return "font-weight:bold; color:darkred;";
      }
      else if (grid.getFieldName(colNum).equals("ETS_FEEDBACK"))
      {
      if (record.getAttribute("ETS_FEEDBACK").equals("9")) // ricevuto
      {
      return "font-weight:bold; color:#006400;";
      }
      else if (record.getAttribute("ETS_FEEDBACK").equals("2")) // ricevuto
      // con
      // errore
      {
      return "font-weight:bold; color:darkred;";
      }
      else // in attesa feedback
      {
      return "font-weight:bold; color:blue;";
      }
      }
      else
      {
      return "font-weight:bold; color:black;";
      }
      }
      catch (Exception e)
      {
      e.printStackTrace();
      return "font-weight:bold; color:black;";
      }
      
      }

      Comment


        #4
        UPDATE
        The problem is present only with the override of CSS enabled and the groupbyfield enable

        Comment


          #5
          Hi b.bottai,

          I'd try to reduce the number of rules and see when the problem disappears.
          Only thing perhaps not ok is setEnabled(false), because you are modifying the ListGrid, while you should only return a string.

          That being said, you could replace all of your rules with way more declarative Hilites.

          Best regards
          Blama

          Comment

          Working...
          X