Hi,
when i set as DataSource an empty collection (ObservableCollection) the header of the datagrid. disappers.
It's possible to set a property (?) that leave the header when the collection is empty?
Thks for help...
Hello,
What is the exact version of our controls that you are using. I cannot reproduce this when testing this with the latest service release for 9.2 :
xamDataGrid1.DataSource = new ObservableCollection<Person>();
Probably I've unterstood the problem.
We have a hierarchy of class.ABusinessObjectEntity (Abstract class) and the really implementation (for example PersonEntity).
When I set the data source to a XamDataGrid I use:
new ObservableCollection<ABusinessObjectEntity> and then I add PersonEntity objects.So when the collection is empty the header disappers.
There is a workaround to leave the header visible? If I add an empty PersonEntity object the header is visible.
Thks for the help.
I try with LabelLocation, but the only solution to display the header with empty collection is to comment the line code of the summary position.If I comment the command the header appears and the summary is attached to the header.If I uncomment the command the header disappers and the summary is attached bottom fixed to the datagrid.
Important I use Unbound field without automatic field generation.
Can you provide a sample project demonstrating this?
I attach a Solution to reproduce the problem.
In the constructor there are three methods to reproduce the problem.
Datagrid 1) loadDataWithHeader() Is the normal case with data and header visible.
Datagrid 2) loadDataWithoutHeaderAndNoData() Is the case without data and without header
Datagrid 3) loadDataWithHeaderAndNoDataAndSummaryPositionCommented() Is the case that header are visible but without data. The difference beetween the method 2 is that the line code is commented //xamDataGrid1.FieldSettings.SummaryDisplayArea = SummaryDisplayAreas.BottomFixed;
The property are the same for the 3 datagrid except the line commented for datagrid 3.
I hope you understand the example.
Sorry for the late response. This looks like an issue. I was able to reproduce this in an isolated scenario. You will be notified when this is resolved and the service release for it is out.
I am also very interested in this issue. It is particularly problematic in the case of FilterUIType="LabelIcons" -- in this case a filter that results in an empty collection causes the header to disappear, and with it, the filter control. Then there is no way for the user to change the filter and get the table back. Aside from that problem, displaying a big empty panel when there are no objects is poor feedback for the user. This problem also creates a serious architecture problem for me. I really need to use business objects rather than a DataView.
I have noted some additional behaviors that may be useful for you in tracking the problem down. Specifically, the problem (i.e. header disappearance on an empty collection) doesn't seem to occur when a summary [aggregation] function has been set -- i.e. if I have a "count" function selected for a column, then the header line (along with the summary area) stays visible even when a filter causes the collection to appear empty.
Is there a workaround for this issue? I noted Sacha's test case makes use of C# [rather than XAML] for setting up most of the XamDataGrid's attributes, and, in particular, the non-problem case required the commenting-out of C# code. Short of a major re-write to replace most of my XAML code with C#, I'm not sure what to try next. (I have tried adding SummaryDisplayArea="Bottom" and other similar things to the XAML, but to no avail.)
Is this issue related to the discussion at the following URL?
http://community.infragistics.com/forums/p/10948/127789.aspx
In that thread, a workaround is suggested by rkcarlin, but I cannot seem to make it work. (Some of the details are unclear in the description of the workaround, so I may be missing something.)
Is there a bug tracking number for this issue? I noticed there was a service release that just went out, but I assume there wasn't time to get this issue addressed, and I assume it'll be a while until the next service release. (Am I right?)