I am trying to implement server-side filtering in ag-grid (infinite scrolling mode).
Problem is - documentation about filterModel is very obscure and I am slowly discovering things using console.log which is getting frustrating because of different information filterModel can provide which also makes mapping to server side classes very tedious. Has anyone found proper documentation about filterModel?
Also, has anyone found helper methods for ASP.NET Core and EF Core to apply this filterModel? It seems like A LOT of work to cover every possible scenario and my current approach requires System.DynamicLinq (not sure if this is optimal solution).
Thanks, Mario
Here are all models I used for grid.
public class SortModel
{
public string colId { get; set; }
public string sort { get; set; }
}
public class FilterModel
{
public FilterModel condition1 { get; set; }
public FilterModel condition2 { get; set; }
[JsonProperty("operator")]
public string logicOperator { get; set; }
public string type { get; set; }
public string filter { get; set; }
public string filterTo { get; set; }
public DateTime? dateFrom { get; set; }
public DateTime? dateTo { get; set; }
public string filterType { get; set; }
}
public class GridOperationsModel
{
public int startRow { get; set; }
public int endRow { get; set; }
public SortModel[] sortModel { get; set; }
public Dictionary<string, FilterModel> filterModel { get; set; }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With