Announcement

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

    Override CSS of pending save ListGrid cell based on the value

    Hi,

    Please help.
    I want to set the CSS of ListGrid cells based on its value. This is achievable by overriding method getCellCSSText of ListGrid. But this works only at grid initialization because once values are edited, it takes style from editPendingCSS. Is there any way that edited cell CSS can be based on its value?

    We have option 'setEditPendingCSSText' to override CSS of edited cell. But it's applicable for all edited cells irrespective of its value.

    Thanks in advance,

    #2
    Well getCellCSSText() is called on any type of draw that occurs on the grid, so hard to follow your question exactly. What does your getCellCSSText() do now, and what are you expecting it to do? It seems just a case of your logic, not a SmartGWT thing. if (record.getAttribute("value") is whatever) return "cssforthisvalue"; Is it you just can get the edited value?
    Last edited by svjard; 1 Jul 2010, 10:50.

    Comment


      #3
      Nice, It was a problem with logic in my code.
      record.getAttribute("value") returns original value of cell, not the edited value.
      So, the CSS was not applying for the edited cells.

      Thanks a lot,

      Comment


        #4
        Hi vikas.patel,

        Could you tell me, how did you solve this problem?

        I have used the record.getAttribute("value") and I got the same problem.

        Comment

        Working...
        X