jQuery UI Widgets Forums Grid Get filter element from specific column

This topic contains 3 replies, has 3 voices, and was last updated by  mr_kirkwood 7 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Get filter element from specific column #103211

    areisyus
    Participant

    I’m using angular 7 and I need to get filter input from a specific column on filter callback function to organize filter data but couldn’t find a way to do it.

    Any ideas on how could I retrieve filter element from a specific column?

    I can’t use getfilterinformation function, once I call it filter seems to stop calling filter callback function I didn’t find the reason but seems lime grid crushes somehow, without throws any exception.

    • This topic was modified 4 years, 9 months ago by  areisyus.
    Get filter element from specific column #103221

    Martin
    Participant

    Hello areisyus,

    Can you, please, check the following Example.
    You retrieve the value of the filter input inside the onFilter event handler.

    Best Regards,
    Martin

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

    Get filter element from specific column #132588

    mr_kirkwood
    Participant

    I can get the onFilter to work. I would like to be able to grab other data from the onFilter results.

    https://www.flickr.com/photos/mr_kirkwood/52690885929/in/dateposted-public/

    I would like to be able to get the building ID as well. The above code gives me only the filter from the dropdown select field (Building Name). Is there anyway to get this data?

    • This reply was modified 7 months, 1 week ago by  mr_kirkwood.
    Get filter element from specific column #132590

    mr_kirkwood
    Participant

    I figured out a way around. I get the Filter data, then I passed it into another query to match the name to get the ID I was looking for.

    ` $ (‘#roomsSortTable’).on (‘filter’, function (event)
    {
    let filters = event.args.filters;
    if (filters.length > 0) {
    console.log (filters[filters.length – 1].filter.getfilters ()[0].value);
    tableFilterDataText = filters[filters.length – 1].filter.getfilters ()[0].value
    console.log (tableFilterDataText)
    getBuldingNameText = tableFilterDataText;
    console.log (getBuldingNameText);
    improvementTableData.filter (c => c.LONGNAME === getBuldingNameText).forEach (function (d)
    {
    console.log (d);
    console.log (d.BUILDINGID);
    getBuildingIDText = d.BUILDINGID;
    });
    } else {
    console.log (“undefined”)
    }
    });

    Thanks!

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

You must be logged in to reply to this topic.