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
105
Identify AddRow when accessing DataSource.Rows
posted

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?

Parents
  • 469350
    Offline posted

    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.

Reply Children
No Data