Hi,
I have added a button in the GroupByRecordPresenter (which is the header of a group.).
I want to actually know how to get all the collection of items that are grouped together.
I am sorry to mention here that the help has been very slow for me. I was posted couple of other questions for which I haven't got any response. Will be grateful for timely response.
Thanks,
Imad.
Hello Imad,
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 copied the default Style for the GroupByRecordPresenter and add a Button in its Template. After that I handled the Button’s Click event and you can see the code I used for retrieving the ChildCollection of the current GroupByRecord. I copied the default Style from here: C:\Program Files (x86)\Infragistics\NetAdvantage 2011.2\WPF\DefaultStyles\DataPresenter\DataPresenterGeneric_Express.xaml file. Please let me know if this helps you or you need further clarifications on this matter.
Looking forward for your reply.
Thanks Stefan for your prompt reply.
In fact I was doing same thing but for some reason I am getting more records than what is there in the GroupByRecordPresenter.
I have two XamDataGrids on the same UserControl. I have added the Style in UserControl's resources so that it applies to both XamDataGrids. Now I have one GroupByRecord each in both XamDataGrids. One has for example 1 record and the other has 2 records but in ChildRecords collection of both XamDataGrid I am getting 3 records instead of 1 record.
I am not sure what wrong I am doing. Would you have any idea? Otherwise i then post my code.