Server side filtering
Hi,
I'm using Vue data grid with PHP for backened. I would like to perform server side filtering but the filter data is sent to server in Json rules format.
How can I convert Json rules to sql string? Should I do it serverside?
Thanks.
How can I convert Json rules to sql string? Should I do it serverside?
Thanks.
SIGN IN To post a reply.
10 Replies
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 20, 2019 10:21 AM UTC
Hi Customer,
Thanks for contacting Syncfusion support.
From your query, we suspect that you want to handle EJ2-Grid actions in back-end (PHP framework). But unfortunately, our EJ2-DataManager does not have support in PHP framework. Also, we would like to inform that we will generate and pass the queryString (based on the Grid actions) from the Grid. So, you need to handle all the Grid actions by yourself based on this queryString in your backend. Please refer the below kb to know more details about how to use EJ2-controls in PHP,
If we misunderstood your query, please share more details about your requirement. This will help us to provide a better suggestion for your requirement as early as possible.
Regards,
Seeni Sakthi Kumar S
MM
Masoud Moghaddari
September 21, 2019 10:27 AM UTC
Hello,
thanks for your fast reply.
Best Regards
Masoud Moghaddari
thanks for your fast reply.
I will create my desired query on the server myself.
Just one more question,
I'm using Query Builder component with Data Grid and DataManager to fill Data Grid server side WebAPI.
Now, I want to send the query from Query Builder alongside the current state of Data Grid to server together so that I'd be able to update the table.
I mean now that I'm filling the data with server side method, every time I do operations like sorting and pagination, is GET request is sent to server. How can I add Query Builder out put to that?
I'm using Query Builder component with Data Grid and DataManager to fill Data Grid server side WebAPI.
Now, I want to send the query from Query Builder alongside the current state of Data Grid to server together so that I'd be able to update the table.
I mean now that I'm filling the data with server side method, every time I do operations like sorting and pagination, is GET request is sent to server. How can I add Query Builder out put to that?
Best Regards
Masoud Moghaddari
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 23, 2019 11:09 AM UTC
Hi Masoud Moghaddar,
We could see you would like to integrate the Data Grid with the QueryBuilder. We have already discussed about your requirement in the following showcase demo.
Regards,
Seeni Sakthi Kumar S
MM
Masoud Moghaddari
September 23, 2019 12:52 PM UTC
Hi,
Firstly, I couldn't find the server side implementation in the link you sent.
Secondly, please kindly help me with another issue. I have to change background color of some cells in "mounted" event. I have the row index and column name. How can I change the cell background color using these information?
for example, I want something like this:
cell[0][id].addClass('red');
which '0' is my row number and 'id' is my column name.
Is there any similar approach available?
Best Regards
Masoud Moghaddari
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
September 24, 2019 11:57 AM UTC
Hi Masoud,
Query #1: Server-end implementation
As we discussed earlier, we cannot handle the PHP server implementation with the dataManager. Would you like to prefer the server-end implementation with the Query Builder component?
Query #2: Customize Grid cells
By default, Grid provides an option to customize cell using its own event queryCellInfo. Refer to the following Help Document.
Regards,
Seeni Sakthi Kumar S
MM
Masoud Moghaddari
September 24, 2019 12:10 PM UTC
Hi,
#2 thanks
Best Regards
Masoud
MM
Masoud Moghaddari
September 26, 2019 09:25 AM UTC
Hi,
I've solved my problem. I've sent the query from Query Builder component to server with an Axios call and the update my table.
Now, I have another problem. I want to place Page Sizes section on the top Data Grid.
How can I achieve this?
Thank you for your efforts!
Masoud Moghaddari
Masoud Moghaddari
TS
Thavasianand Sankaranarayanan
Syncfusion Team
September 26, 2019 12:51 PM UTC
Hi Masoud,
Based on your update we found that you have resolved your previous query and We could see that you would like to render pager at top of the Grid. we have already discussed about your requirement in our documentation. Please find the below documentation link for more information.
Documentation: https://ej2.syncfusion.com/vue/documentation/grid/paging/#how-to-render-pager-at-the-top-of-the-grid
Regards,
Thavasianand S.
MM
Masoud Moghaddari
October 12, 2019 12:02 PM UTC
Hi,
Thank you so much!
My issue has been resolved.
Best regards
Masoud
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
October 14, 2019 12:30 PM UTC
Hi Masoud,
Thanks for the update.
We are gald to hear that your requirement has been resolve and you are good to go.
Regards,
Regards,
Seeni Sakthi Kumar S.
SIGN IN To post a reply.
- 10 Replies
- 3 Participants
-
MM Masoud Moghaddari
- Sep 19, 2019 06:46 AM UTC
- Oct 14, 2019 12:30 PM UTC