BindingListCollectionView.GroupDescriptions Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan kumpulan GroupDescription objek yang menjelaskan bagaimana item dalam koleksi dikelompokkan dalam tampilan.
public:
virtual property System::Collections::ObjectModel::ObservableCollection<System::ComponentModel::GroupDescription ^> ^ GroupDescriptions { System::Collections::ObjectModel::ObservableCollection<System::ComponentModel::GroupDescription ^> ^ get(); };
public override System.Collections.ObjectModel.ObservableCollection<System.ComponentModel.GroupDescription> GroupDescriptions { get; }
member this.GroupDescriptions : System.Collections.ObjectModel.ObservableCollection<System.ComponentModel.GroupDescription>
Public Overrides ReadOnly Property GroupDescriptions As ObservableCollection(Of GroupDescription)
Nilai Properti
Kumpulan GroupDescription objek yang menjelaskan bagaimana item dalam koleksi dikelompokkan dalam tampilan.
Contoh
Contoh berikut menunjukkan cara menggunakan properti ini:
// This groups the items in the view by the property "Category"
PropertyGroupDescription groupDescription = new PropertyGroupDescription();
groupDescription.PropertyName = "Category";
listingDataView.GroupDescriptions.Add(groupDescription);
'This groups by property "Category"
Dim groupDescription As PropertyGroupDescription = New PropertyGroupDescription
groupDescription.PropertyName = "Category"
listingDataView.GroupDescriptions.Add(groupDescription)
Keterangan
Note
Properti ini hanya dapat diatur dengan mengakses objek koleksi dan menggunakan berbagai metodenya seperti Tambahkan. Properti untuk mengakses objek koleksi itu sendiri bersifat baca-saja; koleksi itu sendiri adalah baca/tulis.