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?
Announcement
Collapse
No announcement yet.
X
-
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
-
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
Comment