This is a migrated thread and some comments may be shown as answers.

RadGridView Filtering

1 Answer 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kate
Top achievements
Rank 1
Kate asked on 15 Sep 2013, 02:57 PM
Hello, I have problem with radgridview.
Im using mvvm pattern. In viewmodel i implemented observablecollection which contain rows with data. : 
xaml:
        <telerik:RadGridView ItemsSource="{Binding MyCollection}"
                             x:Name="RadGridViewElement"
                             FilteringMode="Popup"/>

viewmodel:

 private ObservableCollection<myrow> myCollection = new ObservableCollection<myrow>();

        public kolekcja()
        {

            generatedata();
        }
        
        private void generatedata()
        {
           myrow row = new myrow();
            row.Imie = "aa";
            row.Nazwisko = "bb";
            myCollection.Add(row);
            myrow row1 = new wiersz();
            row1.Imie = "cc ";
            row1.Nazwisko = "dd";
            myCollection.Add(row1);
        }

        public ObservableCollection<wiersz> MyCollection
        {
            get { return myCollection; }
            set { myCollection = value; }
        }

Is there any option to return filtered  radgridview data rows  (update myCollection ? or save rows to other collection ?) I would like create graph with the filtered data . I looking for the easiest way to create column header filter from GUI (Just like [DisplayAttribute( AutoGenerateField = false )] ) 
any idea ?
kind regards

 

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 16 Sep 2013, 06:41 AM
Hello,

The RadGridView.Items property always contains the current view, which is the original collection after sorting, filtering and grouping. You can enumerate this property and you will get items that the user sees in RadGridView.

DisplayAttribute.Name is what you are looking for to change the column headers.

Regards,
Rossen Hristov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Kate
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or