Hi,
I'm using xamdatgrid with grouping. I want to expand the groups by default and I'm using mvvm pattern. Please let me know how can we achieve this.
Thanks
Hello,
You can use any event or Command, if the GroupByRecordPresenters are loaded in the visual tree and where you are able to access the XamDataGrid from the sender, EventArgs or CommandParametar, for example you can try XamDataGrid's InitializeRecord event.
Let me know if you have any questions.
Sincerely,ZhivkoAssociate Software Developer
To expand the records, can I use any other event as Loaded event gets triggered earlier than the records added to the source.
In order to expand all records in XamDataGrid you need to call ExpandAll method or iterate though the records and expand them manually, you can do this only in code.
Please let me know if you have any further questions regarding how to expand all group by records in XamDataGrid. Regarding the other questions that you have I suggest to create a separate forum threads for each of them. This way the communication would be easier and there would be no confusion about the issues. Also other community that have similar issues would be able to benefit from the threads too.
I noticed that the datasource is updated later since this is an async call that updates the source, but the loaded event is getting triggered earlier as the grid is loaded. How can we trigger this loaded event after the datasource is updated?
I see that the datagrid.Records.Count is returning 0. Also, we are using ListViewcollection to load the grid.