Announcement

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

    Unable to select last item in listgrid field filter dropdown

    Smartclient version : v9.0p_2013-11-03
    Browser : IE8+

    Hi we have a list grid with the showFilterEditor property enabled. We populated the value map on certain fields so that the user can filter by selecting from the drop down instead of typing. The following is a code snippet. In the fetchData's callback

    gridName.getField('xyz').valueMap = data.getProperty('xyz').getUniqueItems();

    In IE we are observing this weird behavior where we are not able to select the last item in the dropdown using the mouse, but once we dropdown we can scroll to the last item using the keyboard.

    We do not have any such issue in chrome. We are able to select all the items.

    Can you let us know if there is any known issue in this scenario and if there is any other way of generating the drop down for the filters.

    #2
    No known issue of this kind, especially not browser-specific.

    You might not have set the correct DOCTYPE (see FAQ), and since you mentioned IE8+, you might be using a browser that is not supported by 9.0, or be missing patches (you have missed more than a year of patches).

    Aside from that, your approach is invalid. You need to either provide the valueMap in the field definition when the ListGrid is create()d, or call listGrid.setValueMap() to apply it if the ListGrid is already created.

    Comment


      #3
      In the listgrid fetchData's call back method we replace the code with the following and it is populating the filter with a dropdown.

      listGrid.setValueMap('xyz',data.getProperty('xyz').getUniqueItems());

      Now we are observing a behavior where when the page loads for the first time and when the fetchData is called in a function and in the callback the valueMap set the dropdown is not appearing, but when the grid is refreshed using a timer by calling the same function the filter dropdowns are set.

      Also we noticed that the fetchData method is called twice when the page is loaded the first time.

      function xyz(){
      listgrid.setData([]);
      listgrid.fetchData(criteria, function(dsResponse,data){ listGrid.setValueMap('xyz',data.getProperty('xyz').getUniqueItems());
      });
      }

      Comment


        #4
        If you think either of these are actually framework issues rather than issues in your own code, start working toward a minimal, standalone test case that we can run to see the issue.

        First however, you should update to a fully patched build of a current version.

        Comment


          #5
          Finally we were able to resolve the issue by issuing the listGrid.refreshFields() command.

          listGrid.setValueMap('xyz',data.getProperty('xyz').getUniqueItems());
          listGrid.refreshFields();

          Comment


            #6
            We're glad that resolved the problem for you, but this is not normally necessary and the fact that you needed to make this call may indicate a usage issue. We still strongly recommend updating, and you may want to attempt to isolate the original problem so you can figure out the real underlying cause.

            Comment

            Working...
            X