Title: Can I filter a datagrid column with SQL? Post by: gib65 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? Title: Re: Can I filter a datagrid column with SQL? Post by: stworthy on March 07, 2017, 05:07:20 PM Please look at this topic https://www.jeasyui.com/forum/index.php?topic=3710.0
Title: Re: Can I filter a datagrid column with SQL? Post by: gib65 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. Title: Re: Can I filter a datagrid column with SQL? Post by: stworthy 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
|