EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 12, 2025, 04:15:45 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Can I filter a datagrid column with SQL?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Can I filter a datagrid column with SQL? (Read 8598 times)
gib65
Newbie
Posts: 29
Can I filter a datagrid column with SQL?
«
on:
March 07, 2017, 11:51:14 AM »
Hello,
I'm experimenting with filtering on the EasyUI datagrid. I'm wondering if the API has any functions for filtering that can handle SQL string, at least a WHERE clause.
For example, if Status is one of the columns:
dg.datagrid("addFilterRule", "WHERE Status = 'N'");
Is there anything like this in the API?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Can I filter a datagrid column with SQL?
«
Reply #1 on:
March 07, 2017, 05:07:20 PM »
Please look at this topic
https://www.jeasyui.com/forum/index.php?topic=3710.0
Logged
gib65
Newbie
Posts: 29
Re: Can I filter a datagrid column with SQL?
«
Reply #2 on:
March 08, 2017, 11:24:07 AM »
Thanks for the article stworthy,
By the sounds of it, it seems like I'd have to convert the json string that the filter gives me and programmatically convert it to SQL.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Can I filter a datagrid column with SQL?
«
Reply #3 on:
March 09, 2017, 03:51:14 AM »
The datagrid sends the filter rules to server. You must decode it and convert to the SQL according to your database. Please refer to this example
https://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=Remote%20Filtering%20on%20DataGrid
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...