I am trying to perform a foreach loop on a set of UltraDataSource.rows but I found that sometimes the addrow is included and other times it isn't. There is a property within the row called IsAddRow, but I can't access it.
Any Ideas?
Hi,
I've been investigating this issue and I'd like to get some more information from you about exactly what you need here.
The internal IsAddRow property is something of a gray area. It's internal for a reason, and that's because the UltraDataSource doesn't really have a concept of an AddRow - at least no in the same sense as the grid does. This was a flag we added solely for the purpose of dealing with what happens when you cancel an AddRow in the grid. The UltraDataSource gets a notification about the cancellation from the BindingManager and it has to know whether to cancel the changes to the existing row or delete the entire row.
So while we could, in theory, expose the IsAddRow property publicly, it would be confusing and inconsistent and I'm reluctant to do this without knowing more about the use case here.
Please let me know if the workaround (above) works for you. If not, then please provide more information about exactly what you are trying to do, and perhaps I can point you to a better solution.
I did not use the workaround presented, but I was able to figure it out. I am not accessing the IsAddRow Property.
Okay, if you have a solution, I am going to go ahead and close this case. Thanks for the quick reply. :)