query secondary data source when XDocument's DOM is read-only

M

Michael Totschnig

Hello,

When my XDocument's IsDOMReadOnly property is true (during execution of
an Onbeforechange handler), querying a secondary data fails. Is this a
bug or a feature? Any workarounds possible?

Regards,

Michael Totschnig
 
S

S.Y.M. Wong-A-Ton

I think it's by design. Since you can tie a secondary data source to fields
on your InfoPath form and fields are read-only during OnBeforeChange events,
you would not be able to write the results of the querying of your secondary
data source to fields in the DOM, so it is logical that the query fails.

Can you not use the OnAfterChange event for your scenario?
 
M

Michael Totschnig

Thank you for the explanation. OnAfterchange is a bit more complicated
in my scenario but it could also work.
Regards,
Michael Totschnig
 
Top