Assuming the following view model. How do I bind the VisibleItems collection to the RadGridView? One-Way binding would be sufficient, as I would deactivate any filtering from the UI side. Performance is important.
public
class
ViewModel
{
public
ObservableCollection<Item> AllItems {
get
;
set
; }
public
ObservableCollection<Item> VisibleItems {
get
;
set
; }
}
public
class
Item
{
public
string
Name {
get
;
set
; }
}
​Cheers,
Jan
5 Answers, 1 is accepted
I already replied you in the support ticket you opened regarding this question. In order to avoid double posting, I would kindly ask you to continue any further communication regarding this case in it.
Best Regards,
Stefan
Telerik
Hello, Stefan.
Can you share information for all? I also need same possibility. Thank you.
The approach discussed in the given support thread consisted of defining an IsVisible boolean property for the business model and applying a filtering criteria over it. Attached to my reply you can find the sample application demonstrating it. However, I am not completely sure that it would correspond to your scenario. Can you please elaborate a bit on your exact requirement?
Regards,
Stefan
Progress Telerik
Thank you, Stefan, for your answer. Unfortunately this approach is not fit for my task. My task is opposite:
User using filtration in header of columns decrease set of data. Then user wants to select all (but only all filtered records).And I try to find the way how to gat list of filtered items. I have tried to use
item.IsSelected = GridViewGetRowForItem(item) != null;
But it work only for items which are showing on screen (and does not works for records not fitted into screen, at the end of the list).
Can you give me an advice how to solve it.
Ah, just need to use GridView.Items - all items in this list.
Sorry, my question is closed.