Announcement

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

    Hilite Listgrid in SmartGWT

    Hello there,

    I am trying to hilite totalAmount column cells in the listgrid depending on the values it gets from the server.
    But in my case the color is not changing but I get to see the back.png.dont know what I am doing wrong or missing.

    Code:
     
    private static final Hilite[] HILITES_1 = new Hilite[]{
    		new Hilite() {{  
    			setFieldNames("totalAmount");
                setCriteria(new Criterion("totalAmount", OperatorId.GREATER_THAN, 5000));  
                setBackgroundColor("#FF0000"); 
                setTextColor("#FF0000");  
                setCssText("color:#FF0000"); 
                setHtmlAfter(" " + Canvas.imgHTML("[SKIN]/actions/back.png"));  
                setId("0");
            }}
    	};
    in my constructor I have a method called initializeListGrid() which creates creates the listgrid
    Code:
    orderGrid.setFields(productCode, productName, orderPoint, stockCount, lastMonthSales, avgMonthlySales, avgMonthlySales_stock, orderQty, purchasePrice, totalAmount);
    
    orderGrid.setHilites(HILITES_1);
    Last edited by zaj; 9 Dec 2013, 23:30. Reason: made some changes to my code
Working...
X