jQuery UI Widgets Forums Grid jqxGrid | Custom Filter Widget Creation

This topic contains 12 replies, has 3 voices, and was last updated by  ivailo 8 years, 3 months ago.

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

  • raj
    Participant

    Hi,

    Basically I looking for a filter type as “auto complete” or “auto suggest” textbox in a filter row. Can someone provide me the documentation/API link? Where I can get the information regarding the custom filter widget creation in filter row.

    I ran through the documentation & demo pages where I don’t see much details on createfilterwidget.

    Looking forward.

    Regards,
    Raj


    ivailo
    Participant

    Hi raj,

    createfilterwidget is used about customization of existing widgets.
    In our documentation createfilterwidget is in the part about columns property of jqxGrid.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    raj
    Participant

    Hi Ivailo,

    Thanks for your reply.

    I don’t see any explicit examples given for createfilterwidget call back function.

    Actually I’m planning to build a custom filter textbox of type i.e. “Auto Suggest or Auto Complete” in a filter row.

    I can see some examples given for “filterpanel” with “Auto Suggest or Auto Complete“, similarly I’ve to incorporate the same in filter row.

    I tried like the following,

    var fNamedataAdapter = [
    {"label":"Mike","value":"mike"},
    {"label":"Kumar","value":"kumar"},
    {"label":"Raj","value":"raj"}
    ];
    
    columns: [
    { text: 'First Name', datafield: 'firstname', width: 160, 
    	createfilterwidget: function (column, columnelement, widget) {
    		widget.jqxInput({source:fNamedataAdapter});
    	}
    },
    ....

    Here, when I start to type characters in custom filter widget it is working as expected alike “Auto Suggest or Auto Complete” field but at the same time, the grid started triggering the filter operation based on the text which I keyed in. But I don’t want that to happen; instead I want to trigger the filter operation upon selection on the “Auto Suggest or Auto Complete” results i.e. onclick of autosuggest list items the grid has to filter the records.

    Can someone suggest me a solution or idea on how to achieve this functionality.

    Thanks in advance.

    Cheers,
    Raj


    ivailo
    Participant

    Hi raj,

    jqxInput is not supported as filtering option in the filter row. We will consider it for future jqxGrid versions.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    zenmod
    Participant

    Hi raj,

    Did you find a way to do it ? I’m also struggling in the same prob.

    Ivailo,

    Is there any other way to have a filter with autocomplete ? I’m looking for something like the jQuery Chosen plugin for Single select dropdown :
    https://davidwalsh.name/demo/jquery-chosen.php

    Thx,

    jqxGrid | Custom Filter Widget Creation #82319

    ivailo
    Participant

    Hi zenmod,

    An option is creating of custom filter.
    Similar to jQuery Chosen plugin you can use this approach with multiselect jqxComboBox.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    jqxGrid | Custom Filter Widget Creation #82322

    zenmod
    Participant

    Hi Ivailo,

    Thanks. I’m trying with the jqxComboBox approach like this :

    createfilterwidget: function (column, columnelement, widget) {
    widget.jqxComboBox({ source: Adapter });
    }},

    But that’s not working. 🙁
    It fails with error : “TypeError: widget.jqxComboBox is not a function”

    Is that supposed to work ?

    Thx,

    jqxGrid | Custom Filter Widget Creation #82344

    raj
    Participant

    Hi Zenmod,

    No improvements on my custom widget creation. 🙁

    Though the filter is coupled with the grid, I’m not getting any control to stop the filter trigger. The dependency is with the grid hence the jQWidgets team has to come back in future release or team has to give us the callback or pointer where not to trigger the filter.

    Regards,
    Raj

    jqxGrid | Custom Filter Widget Creation #82345

    ivailo
    Participant

    Hi zenmod,

    Please check the reference to jqxcombobox.js.
    That error is related to missing jqxcombobox.js file.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    jqxGrid | Custom Filter Widget Creation #82430

    zenmod
    Participant

    Hi Ivalio,

    I’ve managed to create a filter widget using jqxcombobox. The autocomplete and the drop down list works. However, whenever I select an element on the dropdown list, the table does not gets filtered…
    What am I missing here ?

    Thx,

    zen


    ivailo
    Participant

    Hi zenmod,

    You can create your filter outside of the grid.
    Your needed functionality cannot be created achieved with jqxComboBox as a filter widget.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com


    zenmod
    Participant

    Hi ivalio,

    I need to create it inside the grid.

    Why not possible ? Since it allows to add the combobox to the filterrow ?

    Is not even possible to emulate the filter effect? I mean, when the value in the combobox in the FilterRow gets changed, get the selected value and apply a filter on that column. Is that also not possible ?

    Do you see any other option to have this filter inside the grid ?

    Thanks,

    jqxGrid | Custom Filter Widget Creation #82479

    ivailo
    Participant

    Hi zenmod,

    Unfortunately there is no more options.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.