Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Grid Control with Filter, access to filtered items #1109

Unanswered
theboffin asked this question in Q&A
Discussion options

I can't seem to find a way of accessing programmatically the Count() or indeed the List of items when you apply a filter to a grid.

I would like to have a grid filtered, then apply an action across that list of filtered items. Is there any way of walking the items in a grid programmatically after the original source list of items has been filtered?

You must be logged in to vote

Replies: 1 comment

Comment options

I achieved this by cloning the GridDataProviderRequest and adjusting the paging to then get a full listing of records.

 var newRequest = new GridDataProviderRequest<TypeInstance>() 
 {
 CancellationToken = _request.CancellationToken,
 PageNumber = 1,
 PageSize = 10000,
 Filters = _request.Filters,
 Sorting = _request.Sorting,
 };
 GridDataProviderResult<TypeInstance> filteredSet = newRequest.ApplyTo(typeInstances);
 foreach (var aChiller in filteredSet.Data)
 {
 ...
 }
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /