Retain Radzen grid filtered rows after any action on grid

Is there any way to persist the filtered rows in radzen grid, after performing some action on grid like edit/cancel or custom action?

Ex: I'm displaying employees data in radzen grid and it has 20 records .Each row has one button to disable/enable the employee record.
Step 1 : Now filter any column in the grid using advanced filter option. Now I get 10 records.
Step 2 : Perform some action like disable/enable any of the record.
Step 3: After successful enable/disable row update, grid is refreshing and getting back 20 records.
Step 4 : Expectation is that grid should retain the filtered data ie; it should have 10 records only.

Is there any way to achieve this?

Not sure how to perform this, can you provide more info?

Hi,

Step 2 : Perform some action like disable/enable any of the record.
I have radzen switch button in each row. So, i can able to enable or disable employee info in database.
After success/fail update in database, grid is not retaining the filtered data.

How you disable/enable records?

You didn't answer my question once again. I give up.

Hi,

Its very simple, we have a employee model and in that having a property 'isactive' . So on click of switch i make the flag to false and push the model to API. API will connects to db and update flag in DB. After successful update, row in radzen grid updates and based in isactive.

I'm not disabling/enabling on UI..It's just a status

My Question is related to how do we retain the filtered data after any action on grid. (Action means anything like i can have any button and i can edit/cancel/delete/enable..etc).

Hope you clear with my query and looking forward for your help !
Thanks in Advance !!

I'd filter at the invoke data event for the grid instead of in the grid, but it looks like doing what you want is possible -
DataGrid filter values in ColumnCollection - Radzen.Blazor Components - Radzen

Thank you so much !..You understand my query well.
I have gone through the link given shared by you. Need more understandings on this.
If you able to provide any sample code, i would appreciate that as we are completely new to this radzen.

I don't know about saving filter state, that's new to me and I haven't played with it. However, to filter the data before the grid instead of via the grid you should study the documentation, examples, and posts here about using the query designer. You can also use Linq in the query designer - Invoke your data source, and do something like ${result.Where(x => x.ID == variablename)}.