I know that radzen webassembly uses odata to fetch data. I am having a real problem with filtering in radzen blazor studio (using .net8 auto). I have set up 2 datetime parameters in a blazor page. This is a standard crud page created using the new page wizard. All I am trying to do is get the data between the 2 datetime parameters, but no matter how I format the datetimes it keeps say unable to load the data.
I have done nothing but add these 2 parameters:
[Parameter]
public DateTime startDate { get; set; } = DateTime.Today;
[Parameter]
public DateTime endDate { get; set; } = DateTime.Today;
This is how the Grid0LoadDate looks
protected async Task Grid0LoadData(LoadDataArgs args)
{
try
{
var result = await AccelerateService.GetDeals(
filter: $@"{args.Filter} and DealDate ge {startDate} and DealDate le {endDate}",expand: "Store",orderby: $@"{args.OrderBy}",top: args.Top,skip: args.Skip,count: args.Top != null && args.Skip != null,select: "");
deals = result.Value.AsODataEnumerable();
count = result.Count;
}
catch (System.Exception ex)
{
NotificationService.Notify(new NotificationMessage(){ Severity = NotificationSeverity.Error, Summary = $"Error", Detail = $"Unable to load Deals" });
}
}
I have tried to format the dates as strings, different formats, etcs...but i doesn't work. what did I do wrong?