RadzenDataGrid Filter Problems

Hello all,
my problems with the filter is unfortunately not resolved.

in my grid I save the filter:
1)
var myFilter = args.Filters.Where(x => x.FilterValue != null).Select(x => new { Property = x.Property, FilterValue = x.FilterValue }).AsEnumerable().Select(c => new Tuple<string, string>(c.Property, c.FilterValue.ToString())).ToList();

and restore them
2)
foreach (var c in RadzenGrid.ColumnsCollection)
{
[...]
c.FilterValue = myFilter.Items2
}

this works fine.

Now I want to clear the filtering with

grid.Reset()

this will only Clear the user settings NOT the settings I set into the Code (see 2)
if I want to clean this, I have to do

foreach (var c in RadzenGrid.ColumnsCollection)
{
[...]
c.FilterValue = null;
}

Why?
And is there a easyer way to do this?

Hello all,

Clearing the filter at no Text columns like INT and DATETIME

I set the filter codeside : column.FilterValue = elem.Item2; e.g 123 and "some Text"
My Gird is filtered.
image

Now the User gos into the filtercell and deleted the number and pressed enter or leave the filtercell.

The grid set the number from the codeside filter setting automatically back and start a new search.

The user has no chance to reset or clean this filter

Same problem have with Datetimes.
Only Text will work fine.

Some idee?

Hey all,
we use the standard filter template for Datetime.
image

If the user want to search for one full day there is no option. EQUALS always adds the time.
image

Is there a easy way to search between?

Hey @Pinki,

DataGrid filtering works with DateTime which is date + time.

Is there a way to search only for Date and not for Time?
Because searching for Create_date = Date+Time makes no sense in this case.

The gridcolumn should have the Format Date + Time.

1 Like

No, there is no such way.

Hello,
here my workarroud. If someone needs it too:

remove time before get the data

filter = loadDataArgs.Filter.Replace("T00:00:00.000Z", "");

hide time picker on the page

.rz-hour-picker     {     display: none; }  
.rz-minute-picker  {     display: none; } 
.rz-separator        {    display: none;  }

Yes, you can use FilterTemplate for only search with date and call to method to filter your data like

data.Date == filter.Date

image

I think it's too much complex way