jQWidgets Forums

jQuery UI Widgets Forums Grid Clear button to filter row

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Clear button to filter row #58164

    Kiran Kumar.H
    Participant

    Hi,
    I have added a image to filter row of grid. On click of the image it clears the filters in the filter menu.

    var clearFilterImage = function (column, columnelement, widget) {
    var FilterContainer = $(‘<div></div>’);
    var ClearFilterContainer = $(‘<div></div>’);
    ClearFilterContainer.attr(‘style’, ‘position:absolute; z-index:20000; padding-left:15px;padding-top:7px;’);
    ClearFilterContainer.attr(‘id’, ‘divClearFilter’);

    var imgAction = $(‘‘);
    imgAction.attr(‘id’, ‘imgClearProjectFilter’);
    imgAction.attr(‘src’, ‘../Img/clear.png’);
    imgAction.attr(‘alt’, ‘Clear filter’);
    imgAction.attr(‘align’, ‘middle’);
    imgAction.attr(‘style’, ‘cursor: pointer;’);
    imgAction.attr(“onclick”, “$(‘#jqxgrid’).jqxGrid(‘clearfilters’);”);

    ClearFilterContainer.append(imgAction);
    FilterContainer.append(ClearFilterContainer)
    columnelement.html(FilterContainer.html());
    }

    Below is the command column in the grid(edit icon, delect icon)
    { width: ’70px’, menu: false, filterable: true, align: ‘center’, sortable: false, resizable: false, editable: false,
    renderer: headerActionRenter, cellsrenderer: cellsEditRenderer, createfilterwidget: clearFilterImage
    }

    this is working fine. but when you group by some column in the grid. this image is cleared.

    i think, as soon as you group by some column, the filter row is re rendered.

    please let me know what can we do for this?

    Thanks,
    Kiran

    Clear button to filter row #58170

    Dimitar
    Participant

    Hello Kiran,

    The purpose of createfilterwidget is to set up additional settings of the filter widget and not replace its HTML. What you are trying to implement is not supported.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.