jQWidgets Forums

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Manually typing date filter Manually typing date filter #133762

    anichifor3pg
    Participant

    Hi,

    Is there a way I can follow this issue?
    I wanted to know an estimate for this so we can schedule an upgrade for the jqwidgets version.

    Thanks!


    anichifor3pg
    Participant

    That worked perfectly, thanks!
    If anyone else needs this, I replaced the hardcoded datafield name with this:

    function columnMenuOpening(menu, datafield, height) {
    let dateDatafields = columns.filter(column => column.filtertype === ‘date’).map(column => column.datafield)
    if (dateDatafields.indexOf(datafield) > -1) {
    displayDatePickerButtons();
    }
    }

    function displayDatePickerButtons() {
    const dateTimeInputs = Array.from(document.querySelectorAll(‘div.filter div.jqx-datetimeinput’));
    dateTimeInputs.forEach(e => {
    const showFooter = $(#${e.id}).jqxDateTimeInput(‘showFooter’);
    if (!showFooter) {
    $(#${e.id}).jqxDateTimeInput({
    showFooter: true
    });
    }
    })
    }

    in reply to: How to wrap column headers How to wrap column headers #133145

    anichifor3pg
    Participant

    Hi,

    Are there any news on this? It would be very useful to have a wrap option in the grid configuration.

    Thanks!


    anichifor3pg
    Participant

    Hi, regardless of where I put the removesort call (either in the bindingcomplete event or outside it), I get the bindingcomplete error. Changing the async property doesn’t affect that, it just seems to introduce more issues, as I mentioned above (it only removes the last applied sort, and has no effect on older ones).


    anichifor3pg
    Participant

    Hi Ivan,

    I added async false to the source and the error still appears.
    I noticed that if I remove the loadstate step, the removesort method removes all sorts when async is true and it only removes the last sort when async is false. Even if I call the method multiple times, it does not remove the other sorts.
    The error still shows up in the console in all the cases above.

    Thank you,
    Ana


    anichifor3pg
    Participant

    Hi, I have the same issue and I need a suggestion how to solve it. I’m using jQWidgets 16.0.0 with server side filtering, sorting and pagination and I have the following code:

        let initialGridState = null;
        let resetSortFlag = false;
        function resetGridState() {
            resetSortFlag = true;
            $('#grid').jqxGrid('loadstate', initialGridState);
        }
            $("#grid").on("bindingcomplete", function () {
                if (initialGridState === null) {
                    initialGridState = $("#grid").jqxGrid("savestate");
                }
                if (resetSortFlag) {
                    resetSortFlag = false;
                    $('#grid').jqxGrid('removesort');
                }
            });
    

    Things that I tried:
    1. I had removesort in the resetGridState function and I was receiving the bindingcomplete error
    2. I created the resetSortFlag variable and moved removesort to the bindingcomplete trigger and I still receive the same error, even though removesort is called from the event trigger, as suggested in the error message.
    3. I tried your suggestion above and replaced removesort with $('#grid').jqxGrid({ source: dataAdapter }); unfortunately this doesn’t remove the sorting, it just stays the same.

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