jQWidgets Forums
jQuery UI Widgets › Forums › Grid › How to filter foreign key columns
Tagged: jqxGrid,foreign key columns
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 5 years ago.
-
Author
-
When the field provided by the server is only id, this is no problem, I can effectively display the “name” of the id in the front end according to the foreign key. There is a question, when I do this, how should this column be filtered, because the field he transmits to the server is “name”, does the format that the server should maintain contain “name”? How do I interact with the server?
Hello JenkeNg,
Please, take a look at this tutorial:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-filtering.htm?search=
Also, you could find all our demos in the download package.
I mean that you could use them for testing purposes.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comSorry, I haven’t used the php language, so it’s a bit difficult to see the example you gave, but I probably learned that your example seems to explain how to interact with the server (in fact, this is not a problem), I want to ask about “ key/value column” how to interact with the server. If the SQL statement in the background is “select id from table where…”, my front end can display it as the actual “name” based on this id, but when I filter this column, its filtervalue should be “name” . Inclusion, the id found in the background is 1, I let him display as “Jenke”, but when filtering, I must enter a value similar to “Jen” to query, in this case, the SQL in the background will be ” select id from table where id like‘’%Jen%‘’”, you will can’t find it. Do you understand what I mean?
Hello JenkeNg,
When you using a Server-Side Filtering then you could handle this there.
You could return the specific records depends on the query.
Please, take a look at this tutorial, it could be helpful:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/asp.net-integration/asp.net-grid-server-side-filtering.htm?search=
About the key/value column I would like to suggest you look at this demo:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/gridkeyvaluecolumn.htm?lightBest Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.