Announcement

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

    DateItem listgrid column filtering

    Hi,

    I'm using smartGWT version 2.5 and have a server DataSource with data field type, this datasource is assigned to list grid with shown filter.

    my sample is the same as in showcase http://www.smartclient.com/smartgwt/showcase/#grid_daterange_filtering - second table with miniDaterRangeItem, just difference is that my grid has autFetch set to false and datasource have setClientOnly(false)

    In such created table is filter in date column represented as simple dateItem so I can select only 1 value instead of dateRange filter that you can see in showcase's sample. When I change setClientOnly(false) to setClientOnly(true) filter is correctly rendered so as range item.

    Where is the problem, how can achieve to have date range filter in date column?

    thanks,

    michal

    #2
    The date-range-item requires support for AdvancedCriteria (since it is generating nested criteria - the other field values plus a greater than / less than pair of criteria for the date field).

    As such it will only show if the DataSource the grid is bound to advertises that it supports advanced criteria. This is true for clientOnly dataSources and, if using the commercial product for the standard sql dataSources, where server logic has been written to handle advancedCriteria on fetch requests.

    It's assumed to be false for other dataSources (for example if you have a "generic" server type datasource backed by custom logic for each operation type).
    You can change this by setting 'willHandleAdvancedCriteria' to true on your dataSource - though of course any custom server logic would need to be written to expect Advanced as well as Simple criteria to be passed from the client on fetch requests.

    Comment


      #3
      thanks for explanation and help,
      our server controllers handles advanced criteria so setting willHandleAdvancedCriteria to true solves our problem.

      thanks,

      michal

      Comment

      Working...
      X