Hi Viktor,
Greetings from Syncfusion.
Query: is this method (Grid.getQuery()) not supposed to get current query from the grid?
We have validated your query and by default we have Query property in our grid. It is used to pass some additional parameters to grid. You can this type of details in grid.getQuery() method.
Query: this leads me to ask the question of it is somehow possible to get the current query (where\sort) from the grid?
You can get the current query of the grid by using generateQuery method. Here, we have getting current grid queries by using button click. Please find the below code snippets and sample for your reference.
[code snippets]
<div class="control-section">
<button id='show' ejs-button class='e-flat' (click)='show()'> Get Current grid query </button>
<ejs-grid #grid [dataSource]='data' allowPaging='true' allowSorting="true" allowFiltering="true" [allowGrouping]="true" [groupSettings]="groupOptions" [pageSettings]='pageSettings'
height="320" (dataBound)='dataBound()' [query]='query'>
<e-columns>
...
</e-columns>
</ejs-grid>
</div> |
...
export class AppComponent {
public data: Object[];
...
show() {
console.log(this.grid.getDataModule().generateQuery());
}
} |
Please get back to us if you need further assistance.
Regards,
Thavasianand S.