Announcement

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

    ListGrid filtering

    I am using SmartGWT Power 6.0 and I have a basic ListGrid question. I populate my grid by calling ListGrid.setData(). I wish to be able to filter columns on each keypress. I am initializing the grid by calling the following methods:

    ListGrid.setShowFilterEditor(true);
    ListGrid.setFilterOnKeypress(true);
    ListGrid.setAutoFetchData(true);

    When the grid is displayed, the filter editor appears but when type into the filter text nothing happens. I tried clicking the filter button as well but it did not work either. Any guidance would be greatly appreciated.

    Thanks,
    Ken

    #2
    Check the Developer Console - it is most likely full of warnings tell you that filtering is not allowed without a DataSource (this is why you should always have the Developer Console open while writing code).

    Note that once you've provided a DataSource, it is possible to work with data provided via setData() - see listGrid.filterLocalData for how this works.

    Comment


      #3
      Oh also, with a DataSource provided, setting autoFetchData will of course actually fetch data from the DataSource, which will then discard the data you provide via setData(). So you need to choose only one of those two approaches - either provide data via setData(), or fetch it via autoFetchData or a call to fetchData(), but not both at once.

      Comment


        #4
        For some reason I am unable to open the developer console. I followed the instructions in the quick start guide. In my gwt,xml file I inherit com.smartgwt.tools.SmartGwtTools. I then setup a bookmark to javascript:isc.showConsole(). But nothing happens when I click on the bookmark,

        Comment


          #5
          You may have a pop-up blocker or similar software installed, or you may have no -default security settings in whatever browser this is - disable all extensions and reset to factory settings.

          Also try creating a Button in application code that opens the Developer Console using the Java API (on the SC class). If that works, then your browser settings / extensions are clearly the issue.

          Comment

          Working...
          X