When I hide rows by either Records.Visibility, FieldLayouts[0].Fields.Settings.MaxCellHeight the summary gets hidden also. Is there a way to hide rows yet still have their results included in the Summary.
Hello,
Thank you for your post. I have been looking into it and I can suggest you set the DataRecordPresenter’s Height to 0 instead of Record’s Visibility to Hidden or Collapsed, like this:
DataRecordPresenter.FromRecord(xamDataGrid1.Records[2]).Height = 0;
This way the Record won’t be visible and will be included in the Summary calculations. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Thanks. This works for the records in view. But the records below the viewport do not get hidden. They now scroll into view. I am iterating through all the records even the ones off the display/viewport. Then if I run my command again, it hides the next set of records that are in view. If I repeat my command eventually they all get hidden.
Another approach you can use is shown in the Feature Browser under XamDataGrid / Performance / Improved Performance in Summaries section. You can create your own summary calculations based on the DataSource directly, not the visible Records, so by using it you can set Record’s Visibility to collapsed and this won’t affect result.
Hope this helps you.
BTW:
<igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings FilterUIType="LabelIcons" ResizingMode="Immediate" AutoArrangeCells="Never" ExpansionIndicatorDisplayMode="Default" AutoGenerateFields="False" SelectionTypeField="Extended" SelectionTypeCell="Extended" /> </igDP:XamDataGrid.FieldLayoutSettings >