Announcement

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

    ListGrid Filter resulting in DataSource fetch

    Hi,
    So I have a ListGrid with filters as below
    Click image for larger version

Name:	1.JPG
Views:	155
Size:	33.5 KB
ID:	251227
    However, when I'm trying to use Filter for any of the columns, the ListGrid is trying to do a DataSource fetch instead of locally filtering the records
    Click image for larger version

Name:	2.JPG
Views:	113
Size:	13.3 KB
ID:	251228
    and is returning the records as is initially returned
    Click image for larger version

Name:	3.JPG
Views:	144
Size:	36.7 KB
ID:	251229
    For the backend I'm also sending the number of records to be displayed

    DSResponse response = new DSResponse(res);
    response.setStatus(DSResponse.STATUS_SUCCESS);
    response.setSuccess();
    response.setStartRow(0);
    response.setEndRow(res.size());
    response.setTotalRows(res.size());
    return response;


    The properties of the ListGrid are as follows
    lGrid.setAutoFetchData(false);
    lGrid.setShowGridSummary(true);
    lGrid.setCanEdit(true);
    lGrid.setShowFilterEditor(true);
    lGrid.setFilterOnKeypress(true);

    Can someone please help me to define the filter of the columns as a local filter, instead of doing a backend fetch every time?


    #2
    See listGrid.dataFetchMode, and for more context, the ResultSet class docs.

    Comment

    Working...
    X