A couple of issues I would like to get feedback / workarounds for (using WPF v.9.1.20091.1006):
1. I have the FieldLayoutSetting set as follows:
ExpansionIndicatorDisplayMode="CheckOnDisplay"
However if the top level collection contains items with multiple child collections, then this does not work as expected. All the expansion indicators are left visible with the default '+'. If you have only a single child collection then all works as expected and only the items with a non-empty child collection display the expansion indicator.
2. It appears that the description for a layout only shows if there are multiple sibling collections per parent. (see attached pic). I would like to have the description always show. Is there a way to accomplish this?
Hello,
I was not able to reproduce this behavior. Here is a screenshot of what I am getting when binding the XamDataGrid to a NWind DataSet.
Am I missing something?
If so, please give more information or better attach a sample project so that we can look it in.
Alex.
I think your example also has two children per parent.
I have put together a small example that shows the problem. The sample has two datagrids that both bind the same data. The first grid binds both child collections, the second only one of the two. When you expand the parent items you can see the label differences:
This version of the example shows the expansion indicator issue. In both datagrids the expansion indicator for the first item ("FOO-0") should be hidden as the child collection(s) do not have any items. However this only works if you have a single child collection, not multiple.
These behaviors are both intentional and the reasons for this are:
Regarding the expansion indicator:
Regards,
Thanks for looking in to this Alex.
These behaviors may be intentional, but they may not be desired (by IG customers ;-)
1. Regarding labels: I want the ability to customize this behavior. If I have a mix of multiple children/single children then having this 'default' behavior makes my UI look choppy. I would like options to 1) always show, 2) never show, 3) default behavior.
2. Regarding expansion indicator: Seems to me that the behavior should be consistant regardless of the number of child collections. If no child collection contains items then do not show the expander. If any child collection has an item, then show the expander. I will investigate manually handing this, but since I am not using events (using the MVVM pattern, I will need to encapsulate in an attached behavior).
Can #1 be at least added as a request (and preferably both)?
TIA
Fintan
Fintan,
I see your point - this may lead to some inconsistencies in the look and feel of your application and it is best to have some more built-in options for you to choose from.
You can submit it (or both) as a feature request here and we will try to include this in the future releases.
I suppose setting the
FieldSettings - > ExpandableFieldRecordHeaderDisplayMode="AlwaysDisplayHeader" will give you the desired effect you are looking for regarding the label of the expandable field?
Brilliant! Just what I was looking for. Thanks.