I have several Silverlight pages that use the XamGrid along with data retrieved thru a DomainDataSource. We noticed that we had an issue on some of these pages, when the data is editable. We experienced this problem with 2012.1 (last service release), but confirmed also in 2012.2 - so maybe other versions are affected.
If a cell in almost any row is edited, and while the cell is in EditMode the user clicks on a button outside of the grid (for example, to save/submit changes to the DomainDataSource entities), then the cell goes thru the EndEdit, stays selected and active, and the button click event is fired.
If, however, the cell edited is in the last row of the grid, the cell goes thru the EndEdit, but the first cell of the row becomes active, and the button click event is lost.
After lots of investigation, the issue appears to be in the XamGrid source, and is related to how the XamGrid handles data from a DomainDataSource. When the EndEdit calls "CommitEdit" thru the DataManager, the IEditableCollectionViewData.CommitEdit() for the underlying DomainDataSource object is called. The DDS appears to switch the 'current' item to the previous item, and then back, during this commit. This in turn triggers the ActiveItemChanged callback in the XamGrid (which perhaps should be ignored?). There is a line in this code that calls ResolveIndexForRecord() of the DataManager for the new 'current' item, which returns inconsistent results from the DDS, and appears to cause the bug.
I am trying to work around this issue by using the underlying EntitySet from the DDS as the ItemsSource for now, but I may be losing features of the DDS that I need. Is there any chance for an investigation and/or possible fix?
Hello Rob,
Thank you for your post.
While I personally have not had too much experience in using the XamGrid with a domain data source, I am currently investigating into this issue you are seeing. I am in the process of creating a sample project to test this behavior that you are seeing, and I should have more information for you on this matter soon.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thank you Andrew,
Please let me know if you have more details. We have an intermediate release planned shortly, and would prefer to have this resolved without a workaround.
Best Regards,
Rob Vickers
I have been investigating into this issue you are seeing, I have tested with a few separate versions. Specifically, I have tested against the latest version of 12.1, 12.2, and our latest 15.2 Silverlight product. The specific versions I tested against were 12.1.20121.2295, 12.2.20122.2283, and 15.2.20152.2032. However, I was unable to reproduce this error you are seeing using these three versions. Are either of the 12.1 or 12.2 versions equal to the versions you tested against?
I am not entirely sure whether or not you will be able to actually run the sample project I have attached, but I am attaching the sample that I used to try and test this issue you are seeing. Please verify or refute that this sample is a worthy demonstration of what you are trying to achieve in your application. If it is, and we are using the same assembly versions, then it is likely that this issue is either coming from some code inherent to your application, or an environmental issue. Any other details that you can possibly provide regarding the settings on your XamGrid or the environment that you are testing in would be helpful.
With respect to having this issue resolved without a workaround, if this issue does eventually become reproducible on my end and it does appear to be an issue with the XamGrid control, then this issue will need to go to our development teams in charge of the XamGrid to be fixed. That is, if this is reproducible on my end on a version of 15.1 or higher. The 12.1 and 12.2 Infragistics Silverlight control sets have passed their life-cycle for new development and fixes. Currently, the only versions receiving fixes at the moment are versions 15.1 and higher. This is all documented on our product lifecycle page on our website, here: http://ko.infragistics.com/support/product-lifecycle. As this fix would only be made in versions 15.1 or higher, it may be advantageous for you to consider downloading a free trial of a more recent version of the Infragistics for Silverlight controls and test against them to see if this issue still exists there. If it doesn't this likely means that it was fixed at some point between 12.2 and 15.1.
Thanks Andrew,
I will do my best to verify or refute the case, and will let you know as soon as I am able. Thank you for your assistance. If I see significant differences, I will modify your sample to the best of my ability to match to see if I can then reproduce the problem.
Rob
Thank you for your response. I will continue to monitor this forum thread while you test the sample project I had sent you. I look forward to your next response.
Hello Andrew,
I was able to test the sample project, and I was able to reproduce the issue with a small addition. I'm unsure what difference this makes to the grid, but the issue will appear.
In the DomainDataSource, set the PageSize to 10000. (I.e., per the example:)
<riaControls:DomainDataSource x:Key="domainDataSource1" Name="domainDataSource1" PageSize="10000" AutoLoad="True" QueryName="GetDimEmployeesQuery" LoadedData="domainDataSource1_LoadedData">
<riaControls:DomainDataSource.DomainContext>
<loc:AdventureWorksDomainContext/>
riaControls:DomainDataSource.DomainContext>
riaControls:DomainDataSource>
Please let me know if this permits you to reproduce the problem on your end. If not, I can send you my solution.
I have been investigating into this a bit further, and this does appear to me to be a bug in the XamGrid. This is rather unexpected behavior, and as such, I have asked our engineering staff to investigate further. To ensure that it receives attention, I have logged this in our internal tracking system with a development ID of 213028.
I have created you a private support case on this matter, which will be linked to this issue so that you can be notified when changes to this issue are made. This case has an ID of CAS-168934-J9C9V0 and you can access it here: https://ko.infragistics.com/my-account/support-activity.
Thank you for your response. No other questions at this time. I would appreciate any information that you could provide. If a fix is released for current versions, and if that fix has potential workarounds for earlier versions, I would appreciate as much detail as you can provide.
I have modified my sample project to include the PageSize="10000" declaration, and I am now able to reproduce this issue you are seeing. I am just performing a few final tests on this matter, but this appears to be a bug in the XamGrid. I should have more information for you on this matter very soon.