jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • rduclos
    Member

    I can reproduce issues 1 and 2 on your site using IE8 in compatibility mode set for IE7 standards.

    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filtering.htm?energyblue


    rduclos
    Member

    var addfilter = function () {
    var filtergroup = new $.jqx.filter();
    var filter_or_operator = 1;
    var filtervalue = ‘filter1’;
    var filtercondition = ‘contains’;
    var filter1 = filtergroup.createfilter(‘stringfilter’, filtervalue, filtercondition);
    filtervalue = ‘filter2’;
    filtercondition = ‘contains’;
    var filter2 = filtergroup.createfilter(‘stringfilter’, filtervalue, filtercondition);
    filtergroup.addfilter(filter_or_operator, filter1);
    filtergroup.addfilter(filter_or_operator, filter2);
    // clear filters
    $(‘#dashboardGrid’).jqxGrid(‘clearfilters’);
    // add the filters.
    $(“#dashboardGrid”).jqxGrid(‘addfilter’, ‘anything’, filtergroup);
    // apply the filters.
    $(“#dashboardGrid”).jqxGrid(‘applyfilters’);
    };

    $(“#dashboardGrid”).jqxGrid(
    {
    width: ‘100%’,
    height: 300,
    sortable: true,
    altrows: true,
    showemptyrow: false,
    filterable: true,
    selectionmode: ‘singlerow’,
    theme: ‘energyblue’,
    enabletooltips: true,
    columnsresize: true,
    columns: [
    { text: ‘Owner’, dataField: ‘Owner’, width: ‘10%’ },
    { text: ‘Account Name’, dataField: ‘AccountName’, width: ‘20%’ },
    { text: ‘Service Location’, dataField: ‘ServiceLocation’, width: ‘20%’ },
    { text: ‘Order Number’, dataField: ‘OrderNumber’, width: ‘10%’, cellsrenderer: cpoOrderLinkRenderer },
    { text: ‘Product/Service Name’, dataField: ‘ProductServiceDisplayName’, width: ‘20%’ },
    { text: ‘PTD’, dataField: ‘PTD’, align: ‘center’, cellsalign: ‘center’, minwidth: ‘10%’ },
    { text: ‘NDD’, dataField: ‘NDD’, align: ‘center’, cellsalign: ‘center’, minwidth: ‘10%’ }
    ],
    ready: function () {
    addfilter();
    var localizationObject = {
    filterstringcomparisonoperators: [‘contains’, ‘does not contain’],
    // filter numeric comparison operators.
    filternumericcomparisonoperators: [‘equal’, ‘less than’, ‘greater than’],
    // filter date comparison operators.
    filterdatecomparisonoperators: [‘equal’, ‘less than’, ‘greater than’],
    // filter bool comparison operators.
    filterbooleancomparisonoperators: [‘equal’, ‘not equal’]
    };
    $(“#dashboardGrid”).jqxGrid(‘localizestrings’, localizationObject);
    },
    updatefilterconditions: function (type, defaultconditions) {
    var stringcomparisonoperators = [‘CONTAINS’, ‘DOES_NOT_CONTAIN’];
    var numericcomparisonoperators = [‘EQUAL’, ‘LESS_THAN’, ‘GREATER_THAN’];
    var datecomparisonoperators = [‘EQUAL’, ‘LESS_THAN’, ‘GREATER_THAN’];
    var booleancomparisonoperators = [‘EQUAL’, ‘NOT_EQUAL’];
    switch (type) {
    case ‘stringfilter’:
    return stringcomparisonoperators;
    case ‘numericfilter’:
    return numericcomparisonoperators;
    case ‘datefilter’:
    return datecomparisonoperators;
    case ‘booleanfilter’:
    return booleancomparisonoperators;
    };
    },
    updatefilterpanel: function (filtertypedropdown1, filtertypedropdown2, filteroperatordropdown, filterinputfield1,
    filterinputfield2, filterbutton, clearbutton,
    columnfilter, filtertype, filterconditions) {
    var index1 = 0;
    var index2 = 0;
    if (columnfilter != null) {
    var filter1 = columnfilter.getfilterat(0);
    var filter2 = columnfilter.getfilterat(1);
    if (filter1) {
    index1 = filterconditions.indexOf(filter1.comparisonoperator);
    var value1 = filter1.filtervalue;
    filterinputfield1.val(value1);
    }
    if (filter2) {
    index2 = filterconditions.indexOf(filter2.comparisonoperator);
    var value2 = filter2.filtervalue;
    filterinputfield2.val(value2);
    }
    }
    filtertypedropdown1.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index1 });
    filtertypedropdown2.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index2 });
    }
    });

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