jQuery UI Widgets Forums Grid Grid Filtertype checkedlist not filetring for select all/none

This topic contains 3 replies, has 3 voices, and was last updated by  Peter Stoev 5 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • adam
    Participant

    We upgraded to the latest version of jqWidgets and are experiencing a problem with the filtertype checkedlist when selecting none. The grid renders rows when it shouldn’t. Here is an example where selecting none for unit price column still returns rows. Any help will be appreciated as this is affecting many of our grids:

      var data = new Array();
      var firstNames = [
          "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"];
      var lastNames = [
          "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"];
      var productNames = [
          "Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist"];
      var priceValues = [
          "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0"];
      for (var i = 0; i < 100; i++) {
          var row = {};
          var productindex = Math.floor(Math.random() * productNames.length);
          var price = parseFloat(priceValues[productindex]);
          var quantity = 1 + Math.round(Math.random() * 10);
          row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
          row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
          row["productname"] = productNames[productindex];
          row["price"] = price;
          row["quantity"] = quantity;
          row["total"] = price * quantity;
          data[i] = row;
      }
      var source = {
          localdata: data,
          datatype: "array"
      };
      var dataAdapter = new $.jqx.dataAdapter(source, {
          loadComplete: function (data) {},
          loadError: function (xhr, status, error) {}
      });
      $("#jqxgrid").jqxGrid({
          theme: 'energyblue',
        filterable: true,
        showfilterrow: true,
        width: "100%",
          altrows: true,
          width: 500,
          source: dataAdapter,
          columns: [{
              text: 'First Name',
              datafield: 'firstname',
              width: 100,
              filtertype: "checkedlist"
          }, {
              text: 'Last Name',
              datafield: 'lastname',
              width: 100,
              filtertype: "checkedlist"
          }, {
              text: 'Product',
              datafield: 'productname',
              width: 180,
              filtertype: "checkedlist"
          }, {
              text: 'Quantity',
              datafield: 'quantity',
              width: 80,
              cellsalign: 'right',
              filtertype: "checkedlist"
          }, {
              text: 'Unit Price',
              datafield: 'price',
              width: 90,
              cellsalign: 'right',
              cellsformat: 'c2',
               filtertype: "checkedlist"
          }, {
              text: 'Total',
              datafield: 'total',
              width: 100,
              cellsalign: 'right',
              cellsformat: 'c2',
              filtertype: "checkedlist"
          }]
      });

    Thank you


    adam
    Participant

    Hi,

    It appears that for jqxGrid filtertype checkedlist does not work for columns with null values and those that are cells formatted. Please see the following fiddle Grid not filtering fiddle
    In the fiddle, selecting none for the first three columns does not remove all the rows. Thank you


    Hristo
    Participant

    Hello adam,

    Thank you for this feedback.
    I will create a work item for this.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    Peter Stoev
    Keymaster

    The fix will be part of jQWidgets 8.1.3

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.