Apply exported QueryBuilder rules to grid

I have a Blazor page with a SfQueryBuilder, where I can edit a query and save it to a database.


<SfQueryBuilder TValue="EventModel" @ref="QueryBuilder">

var sql = QueryBuilder?.GetSqlFromRules(QueryBuilder.GetRules());


On another page, I have a Grid which is bound to a OData API.

<SfGrid @ref="Grid" TValue="@EventModel" AllowPaging="true" Query="@qryEvents">

<SfDataManager Url="https://localhost:7000/v1/Events" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>


I want to apply the saved query to that grid. How is this possible?




Thanks,


Sebastian


2 Replies

YA YuvanShankar Arunagiri Syncfusion Team August 9, 2022 08:40 AM UTC

Hi Sebastian,


We are validating your query and will update you the details on or before 12th August 2022.


Regards,

YuvanShankar A



YA YuvanShankar Arunagiri Syncfusion Team August 24, 2022 01:35 PM UTC

Hi Sebastian,

We regret for the inconvenience.


We have validated your reported query and can’t achieve your requirement correctly. SQL which is return from the query builder are string type, based on string type query we can’t filtering the grid component data. Or if you have any method/processing to convert the SQL string type to query type of grid. Please share that code snippet we will check and update the better solution.


Regards,

YuvanShankar A


Loader.
Up arrow icon