jQWidgets Forums

jQuery UI Widgets Forums Grid How to not trigger a service request when filtering

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Hristo 6 years, 5 months ago.

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

  • JenkeNg
    Participant

    Hi,
    I have a question about filtering the grid. In general, when the filter condition is entered, the request parameters are sent to the server to execute the relevant SQL. The problem now is that some of the fields displayed on my page are done under the function “beforeLoadComplete”, and the database has no related fields. For example, the database has two fields, “unit price” and “quantity”, and there is no “total price” field. The “total price” is added in “beforeLoadComplete” and displayed in the grid.
    Now, when I enter the filter condition in the “Total Price” field, the query condition of the server SQL will be triggered, but the actual database does not have this field, so an error will be reported. How can I make a column filter only on the visible grid when filtering?


    JenkeNg
    Participant

    Note: only certain fields filter data from the visible grid, other fields are still found in the background database


    Hristo
    Participant

    Hello JenkeNg,

    You could use the data object of the source and the formatData callback of the DataAdapter to override it.
    Please, take a look at this tutorial.
    I hope this will help.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.