jQuery UI Widgets Forums Angular Problem in Grid Checkbox filters

This topic contains 1 reply, has 2 voices, and was last updated by  ivanpeevski 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Problem in Grid Checkbox filters #121051

    bgl
    Participant

    Hi, we are having problems with the checkbox type filters in the JQXGrid.
    1- We open the checkbox type filter and a single “select all” appears.
    2- We close and open the same filter and an extra “select all” appears, this happens every time we carry out this action.
    3- If we open any other filter and we go back to the previous filter with checkbox, only one “select all” would appear again.
    How could we do so that they do not appear more than one “select all” in the checkbox type filters?
    My code:
    ==============================================================
    HTML
    ==============================================================

    <jqxGrid id=”containerWithouthPayload” #gridAlarmHistory
    (onFilter)=”Filter($event)”
    (onRowselect)=”rowSelect($event)”
    (onRowunselect)=”rowSelect($event)”
    [auto-create]=”true”
    [width]='”100%”‘
    [autoheight]=”true”
    [columns]=”columns”
    [source]=”dataAdapter”
    [columnsresize]= true
    [pageable]= true
    [pagermode]= “‘default'”
    [autoheight]= true
    [sortable]= true
    [altrows]= true
    [cellhover]=”cellhovertooltiprenderer”
    [editable]= false
    [showcolumnlines]= false
    [theme]=”‘light-ingeteam'”
    [selectionmode]= “‘multiplerows'”
    [pagesizeoptions]= “[‘5′, ’10’, ’15’, ’20’,’50’]”
    [pagesize] = “getPageSize()”
    [filterable]=”true”
    [autoshowfiltericon]=”true”
    [ready] = “ready”
    (onRowdoubleclick)=”cell.widget.playType === ‘H’ ? changeITA($event) : null”></jqxGrid>
    ==============================================================
    TypeScript
    ==============================================================
    //Severity DataSource
    severity = [
    { value: “CRITICAL”, label: “CRITICAL” },
    { value: “HIGH”, label: “HIGH” },
    { value: “MEDIUM”, label: “MEDIUM” },
    { value: “LOW”, label: “LOW” },
    { value: “LOW LOW”, label: “LOW LOW” }
    ];

    severitySource ={
    datatype: “array”,
    datafields: [{ name: ‘label’, type: ‘string’ },{ name: ‘value’, type: ‘string’ }],
    localdata: this.severity
    };

    columns: any[] =
    [
    { text: ‘Level’, id: ‘levelId’, width: ‘8%’, datafield: ‘Level’, align: ‘left’, cellsalign: ‘left’, cellsrenderer: this.cellsvaluerenderer, filtertype: ‘checkedlist’, filteritems: new $.jqx.dataAdapter(this.levelsSource)},
    { text: ‘Severity’, width: ‘8%’, datafield: ‘Severity’, align: ‘left’, cellsalign: ‘left’, filtertype: ‘checkedlist’, filteritems: new $.jqx.dataAdapter(this.severitySource)},
    { text: ‘Type’, width: ‘10%’, datafield: ‘Type’, align: ‘left’, cellsalign: ‘left’, filtertype: ‘checkedlist’, filteritems: new $.jqx.dataAdapter(this.typeSource)},
    { text: ‘Device’, width: ‘10%’, datafield: ‘Device’, align: ‘left’, cellsalign: ‘left’, cellsrenderer: this.devicecellsrenderer},
    { text: ‘DeviceFullName’, datafield: ‘DeviceFullName’, align: ‘left’, hidden: true},
    { text: ‘Name’, width: ‘42%’, datafield: ‘Name’, align: ‘left’, cellsalign: ‘left’, cellsrenderer: this.columncellsrenderer},
    { text: ‘DateRange’, width: ‘10%’, datafield: ‘DateRange’, align: ‘left’, cellsalign: ‘left’, hidden: true},
    { text: ‘Counters’, width: ‘10%’, datafield: ‘Counters’, align: ‘left’, cellsalign: ‘left’, hidden: true},
    { text: ‘Value’, width: ‘10%’, datafield: ‘Value’, align: ‘left’, cellsalign: ‘left’ },
    { text: ‘Status’, width: ‘8%’, datafield: ‘Status’, align: ‘left’, cellsalign: ‘left’, cellsrenderer: this.cellsrenderer, filtertype: ‘checkedlist’, filteritems: new $.jqx.dataAdapter(this.statusSource)},
    { text: ‘DateTime’ , width: ‘14%’, datafield: ‘DateTime’, align: ‘left’, cellsalign: ‘left’ },
    { text: ‘Date’ , width: ‘10%’, datafield: ‘Date’, hidden: true}
    ];

    Problem in Grid Checkbox filters #121077

    ivanpeevski
    Participant

    Hi bgl,

    Filteritems accepts values of type array, so there is no need to use the jqx.dataAdapter for the filteritems property.
    You can have a look at this angular demo to see an example of implemented filteritems.

    Also, if you want to display all unique values from a column in the checkbox filter, jqxGrid will do it by default without the need for filteritems property.

    If you have any other questions, please do not hesitate to contact us again.

    Best regards,
    Ivan Peevski
    jQWidgets Team

    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.