Another problem I am having since the 2099 patch:
I have a xamGrid with AddNewRowSettings enabled. It is defined as thus:
<igGrid:XamWebGrid.AddNewRowSettings> <igGrid:AddNewRowSettings AllowAddNewRow="Bottom" IsEnterKeyEditingEnabled="True" IsMouseActionEditingEnabled="SingleClick" IsOnCellActiveEditingEnabled="True" /> </igGrid:XamWebGrid.AddNewRowSettings>
Prior to the 2099 patch, the DataObjectRequested event would be thrown N+1 times. Where N is the number of items in your grid. Since 2099, the DataObjectRequested event is not being fired for the Add Row (which contains defaults). It is only when I click into the add row that I see values in this row.
I have tried to reproduce this problem in a sample solution, but I can't get it to behave the same way when the grid is on a page. The grid I am having issues with is on a UserControl popup. I will continue to try to reproduce the issue with a user control and popup, but I thought that I would throw this out there in case someone has an idea what could be causing this.
I've been banging my head on this for a couple of days..
Hello Alan,
The fix that Steve made for the timing issue is now available in the latest volume release, NetAdvantage for .NET 2010 Vol. 3.
Steve,
While I can't argue that the issue was a timing issue (folks in the office said that they were less likely to see the problem if they waited for disk i/o to cease), certainly the side effect that I saw was the event firing one too few times. If you put a breakpoint in that event, you will not see the event fire enough times when the add row is not populated.
As a side note, I have made the decision to backout of patch 2099 and revert back to 2014.
Sorry guys, nothing personal. :)
Hi Alan,
Thanks for the sample. I was able to identify and fix the problem. Although it didn't have anything to do with the DataObjectRequested event. As that event still fires for the AddNewRow consistently.
The issue actually was that there was a timing issue, where the cells in the AddNewRow weren't getting their bindings set. Which is why when you entered and exited mode the data suddenly appeared. You actually were causing the Bindings to refresh, and thus the data then showed.
-SteveZ
Just to be clear on what the difference is, at the bottom of the grid is your add row. In the New of the Object being created, I have set up some silly default property values. When in a popup, 9 out of 10 times, that default data will not be visible in the add row. It is supposed to be visible because the add row is supposed to fire when the grid's datasource is set. And the event is supposed to do a default new constructor on the object being managed.
I've been able to reproduce this problem in a small solution. The issue seems to be inconsistent event firing when the grid is part of a user control in a popup window. I had no issue with this prior to patch 2099.
What I am seeing happening is that when you run this logic in a user control in a popup, maybe 1 out of 10 times, the event will fire for the add row. When the same xaml and code is applied to a page, it will fire 10 out of 10 times.
To demonstrate the difference, the attached solution has two pages. Set the RootVisual to MainPage to see the popup behavior, and set the RootVisual to Page1 for the page behavior.