jQWidgets Forums
Forum Replies Created
-
Author
-
August 9, 2016 at 6:42 pm in reply to: 'getfilterinformation' returns empty array 'getfilterinformation' returns empty array #86431
Hi,
The following may clarify what I am attempting to do:
1. I create and populate a grid from a remote data source
2. I filter the grid results using the standard ‘filtertype:’ parameters
3. I call ‘updatebounddata’ to refresh grid contents from my remote data source
4. In the ‘formatData:’ callback I call ‘getfilterinformation’ to access the current filter parametersHowever the filter information array always return empty despite the current grid view being filtered.
Do I need to call ‘getfilterinformation’ before I call ‘updatebounddata’ and cache the result for subsequent use in the ‘formatData:’ callback?Update: I tested this and it worked. It appears that ‘updatebounddata’ clears the filter information before calling ‘formatData:’
Mark
August 8, 2016 at 11:19 pm in reply to: 'getfilterinformation' returns empty array 'getfilterinformation' returns empty array #86404Hi Hristo,
This still happens when I have defined specific filter conditions and only filtered items are displayed in the grid. The array returned from ‘getfilterinformation’ is still empty although filtering is clearly being performed.
One point is that I have not specified any custom filters. I am just relying on the built-in default filters for the various ‘filtertype:’s.
I need to access the filter parameters so that I can build a suitable query for my back-end data repository.
Mark
Hi All,
This approach (beforesend: … setRequestHeader …) works for me and includes the custom header I specify in the HTTP request.
However the inclusion of a custom header may cause the browser to precede the HTTP request with a pre-flight “OPTIONS” request, which must be responded to with a “200 Ok” including an appropriate “Access-Control-Allow-Headers: …” before the actual HTTP request will be sent.
“Authorization” is a standard HTTP header for basic authentication and should probably not be used for a fully custom header.
Hope this helps.
Mark
Thanks Peter, that worked.
I want to group a number of widgets such as jqxDateTimeInput and others into a “header” as filter parameters for a jqxGrid display. I have them working stand alone but wondered if I should put them into some sort of container widget for grouping and/or theme formatting and if so what to use.
I looked at jqxToolBar but couldn’t find information on how to include static text or a custom widget. I recall viewing a demo sample that implemented a complex multi-line “menu” similar to MS Word but can’t seem to find it again.
Mark
-
AuthorPosts