Hi
According to -->
http://help.infragistics.com/Help/NetAdvantage/WPF/2010.1/CLR3.5/html/Infragistics3.Wpf.DataPresenter.v10.1~Infragistics.Windows.DataPresenter.FieldSortDescription~IsGroupBy.html
I've a grid which has a groupby field set .
But the groups are closed. How can I set that all gorups are opend automatically when the data is added to the grid ?
Hi,
Just set the xamDataGrid IsGroupByAreaExpanded property to True.
<igDP:XamDataGrid ... IsGroupByAreaExpanded="True">
Regards
I don't want the GroupbyArea getting expended. I want the generated groups (at least some of them ) itself expanded.
Ok, then try this in code-behind:
this.xamDataGrid.Records.ExpandAll(true);
Hello Imran,
Another approach you can try is to handle the XamGrid's Laoded event and use the same code as in the sample I sent you. Thsi way you won't need to add references to Interactions and Interactivity assemblies.
Hope this helps you.
Hi Stefan,
Hope it may work but we are not using Blend at all so we don't have dlls from Blend. and please advise if it will be good idea to add Microsoft.Expression.Interactions in the project? If possible then can you purpose some alternate solution?
Thanks
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I used Interactions to handle the XamGrid’s Loaded event in the ViewModel and there I loop the Rows and expand them if they are GroupBy rows. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
We are using XamGrid and have made a column IsGroupBy=True to apply grouping by default and it is working fine except one thing that we want to make all rows expanded. We are using MVVM so can you help us in this regard. as we are not able to explore any propert related to this feature secondly there is no event called InitializeRecord in XamGrid.
Hello Haggy,
Thank you for your post. I have been looking through it and I suggest you use the InitializeRecord event of the XamDataGrid which is fired every time a new Record is displayed in the XamDataGrid. The RecordAdded event is fired only when you add new item through the XamDataGrid’s AddNewRecord. The ObservableCollection has its own event called CollectionChanged which is fired when the collection is changed. Please let me know if this helps you achieve your goal.