Method to display specific row in paginated RadzenGrid


I am currently looking for a method or strategy for forcing the RadzenGrid to display a specific row/page on a filtered, sorted, and paginated editable grid. The issue I am experiencing is that if I apply filters, the page on which a specific row may appear may change. This is fine as it is a behavior I'm expecting. However, when the grid goes into edit mode via a button within the row, the filters are reset. If the row selected for edit is moved to a different page as a result of the reset of the filters, the display does not change to this page so that the user can edit the row. The user is forced to page back and forth to find the row under edit to complete the operation. What I want to do is, upon the execution of the EditRow method, force the grid to the page the row selected is currently on, this way, the user can edit the row without having to go look for it after selecting it for edit.

Methods which could result in this behavior don't appear to be provided, at least I am not
seeing them if they are. Can someone please assist?


UPDATE: I checked the InLine Editing scenario on the demonstration page and it appears that the demonstration for inline editing DOES NOT clear out the filters prior to transitioning to edit mode, thereby guaranteeing that the rows do not change location/page. However, my grid seems to clear the filtering when EditRow is called. If the demonstration page is done in Angular, is it possible that the Blazor release has a bug? I did update to the latest version of the Radzen.Blazor nuget package and verified that this behavior persists in the newest release (2.15.16).

The demo page is implemented in Blazor :slight_smile: the source code is here. You can actually get the entire application from Github and run it locally.

Thanks for your response! I did download the source code some time ago, so I reran it to check the behavior. The example given in the demonstration does not suffer from the issue, so I pulled out one of projects using grids that I created to see if I couldn't make the issue go away and come back based on settings or structure. I was able to reproduce the problem and I think I have found what the issue is.

On any form where I was extending the search capabilities by specifying the FilterTemplate for the column, this issue occurred. My project had one form that was not using FilterTemplate for any column and the grid performed correctly. As a test, I removed the FilterTemplate from all columns that were using it, however, the problem still occurred. After examining the demonstration again, I noted one other discrepancy, that of the Data property for the grid itself.

In order to use the FilterTemplate, I needed to change the Data to the following:

Data="@(Model.Customers.Where(e => (this.CurrentStatusFilter >= SupportState.Unassigned ? e.SupportStatus == this.CurrentStatusFilter : true) && (this.CurrentExpirationStatusFilter >= ExpirationState.ContractValid ? e.ExpirationStatus == this.CurrentExpirationStatusFilter : true)))"

I needed to do this because I have two DropDowns defined in FilterTemplates for two of the columns. When a filter template is defined, altering the content of the data set appears to be the only way to get the custom filter to hide the rows that are filtered out. BUT, when this is used, this appears to trigger the filters which do not have FilterTemplates to be reset. If I change the Data to


the problem goes away. BUT the FilterTemplate DropDowns fail to apply filtration. So it seems when the data grid Data row count changes (or whatever other mechanism indicates that the data is changed), the filtration is reset.

Is this the intended behavior? Is there a more appropriate method for working with FilterTemplates? Bug? It seems to me that the filters shouldn't drop out just because the data set has changed.

Long story short, is there a "right" way to implement the FilterTemplates such that I can avoid the filter reset behavior?