collections - Silverlight 3 DataGrid Grouping - Detecting Group Header Click or Header Expand/Collapse -


I am using PagedCollectionView in Silverlight 3 for group items in a data grid. I can find out when I click on group headers, but after 6 hours, there can be no way to do this.

(So when a brief title is clicked, I can dynamically load the contents of the group)

The datagrid is populated like this:

PagedCollectionView Collection = New PagedCollectionView (orgMembers); Collection (group). Group (description of new property group ("generation"));

DataGrid1 ItemsSource = Archive;

Type an extension method to search for a specific element of a specific type:

< Pre> Public Static Search FindParentOfType & lt; T & gt; (This framework element element) {var parent = VisualTreeHelper.GetParent (element) as frameworkElement; While (parent! = Zero) {if (original is T) returns (T) (object) parent; Parents = WizardryHelper.GetParent (basic) Framework Element; } Return Default (T); }

Mouse leftbuttonup event handle on the DataGrid:

  Private Zero passportgrid_MouseLeftButtonUp (Object Sender, MouseButtonEventArgs E) {DataGridRowGroupHeader rgh = (e.OriginalSource FrameworkElement ) .FindParentOfType & LT; DataGridRowGroupHeader & gt; (); If (rgh! = Null & RGH DataContact Collection is ViewGroup) {var stuff = (in the form of collection group. Datacontext); Var items = accessories. }}  

You can find information on the group that was clicked and its item archive (shown above)


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -