locked
I am trying to give colour to columns but i don wanna give the color for partulcar column RRS feed

  • Question

  • hi friends,in the above code i am trying to give the colours if a condition matches.i partially succeded but in my table i m having NA word.i don want to give color to NA.so please help me

    if(col>2&&!s.contains("NA")){
                f = Float.parseFloat(s.replace(",",""));
                            }   
                TIndex tab = Index.getTable();
                int fn = tab.FieldNumber(colid[1]);       
                String ival = tab.Value(row + 1, fn);
                float fival = Float.parseFloat(ival.replace(",",""));
                switch (col) {
                case 3:
                   d.fillRectangle(0, 0, w, h, 0xff8080);
                   break;
                case 4:
                        
                    if (fival <= f)
                        d.fillRectangle(0, 0, w, h, 0xa00000);
                    break;
                case 6:
                    if (fival >= f)
                        d.fillRectangle(0, 0, w, h, 0x80ff80);
                    break;
                case 7:
                    if (fival >= f)
                        d.fillRectangle(0, 0, w, h, 0x008000);
                    break;
                }

    Monday, January 30, 2012 9:38 AM

All replies

  • Can you update your first line code with the below one and try

    if((col>2) && (!(s.contains("NA")))){

    Thursday, February 2, 2012 9:48 AM