Hello infragistics community -- When grouping on column 'Type', I would like to show all the types, even if no records of that type exist. If a specific type does not have a record, the GroupByRecord should read typeX (0 items).
My thoughts are that I could intercept the grouping event and see if the user is grouping on 'Type' then add a GroupBy record there somehow.
Thanks!
Hello Daniel,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thanks for the response Stefan. In the meantime, I figured the following workaround (not ideal, but it meets my requirements for now).For the types that do not exist, I add a dummy record of that type and tag it. Then, I set the Visibility of the dummy datarecords to Collapsed in the DRPloaded event. Here is some rough code for the user community:
private void DRPloaded(object sender, RoutedEventArgs e) {
// Hide dummy records. foreach (object o in (sender as DataRecordPresenter).DataPresenter.Records) { recursiveHideDummy(o); }
}
private void recursiveHideDummy(object o) { if (o is GroupByRecord) { foreach (object o1 in (o as GroupByRecord).ChildRecords) { recursiveHideDummy(o1); } } else if (o is DataRecord) { if ((o as DataRecord).DataItem is CustomType1) { if (((o as DataRecord).DataItem as CustomType1).Tag == "DUMMY") { (o as DataRecord).Visibility = Visibility.Collapsed; } } } }
After some research Adding groups has been determine as a new Product Idea. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI12120060
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com