Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Strange behaviour of XamGrid when ItemsSource is DomainDataSource.Data
posted

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?

Parents
No Data
Reply
  • 34830
    Offline posted

    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,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

Children