Announcement

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

    Can't find how to do exact filter in listgrid

    Hi, simple question:

    When I do this:
    Code:
    Criteria criteria = new Criteria();
    Long[] ids = new Long[]{2};
    criteria.addCriteria("id", ids);
    
    myGrid.setCriteria(criteria);
    It matches 2, 22, 2212 etc.
    I want it to match 2, but I can't remember/find how to do it.

    #2
    You need AdvancedCriteria with equals operator.
    Also, what type is the id field in the ds.xml?

    Comment


      #3
      Huh, ok. The documentation could be clearer. It's a Long, not a String in the ds.

      Comment


        #4
        Hi mathias,

        „long“ is not a FieldType in https://smartclient.com/smartgwt/jav...FieldType.html
        Perhaps the framework defaults back to text then?
        Try „integer“ as type in your .ds.xml, also with your simple criteria.

        Best regards
        Blama

        Comment

        Working...
        X