Announcement

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

    Search on values returned from formatCellValue

    I have a simple listgrid with field of type string. I have a formatCellValue on the field. But I cannot search the field on value returned from formatCellValue. Eg.,
    Code:
    formatCellValue : function(value, record, rowNum) {                                      
        //value is string of number like "1234"
        return "ABCD";
    }
    So after the field is rendered, I want to search on the formatted value which is "ABCD".
    But I cannot do that. I guess I have to reindex the field or something.
    How do I get this behavior?

    #2
    Search is designed to match client and server-side, so we can't search on formatted values. Also, the formatted value isn't stored anywhere except in the DOM.

    So, the only way to search on a formatted value is to put it into the data as a field. Even then, you need to make sure the server search matches, or limit to just client-side searching (only safe if the data set is small).

    Comment


      #3
      What does
      you need to make sure the server search matches
      mean? Can you provide an example?

      Comment


        #4
        Hi sjoshid,

        Originally posted by sjoshid View Post
        What does mean? Can you provide an example?
        I assume Isomorphic means:
        • a .ds.xml field with a simple customSelectExpression
        • a .ds.xml field with a call to a more complex function in your DB
        so that the DB can already do the filtering.

        Best regards
        Blama

        Comment


          #5
          Alright. thank you.

          Comment

          Working...
          X