Hey Everyone,
I'm having a problem which is driving me crazy, so hopefully someone can help me.
I have a drop-down list on a form, which I have added a rule to so that when the value changes, some code-behind c# code is called. This c# code calls a webservice to retrieve some data based on the user selection. All that works fine, and the data is retrieved successfully.
When I try and update the appropriate field, however, I get an exception saying "Attempt to modify a read-only node". I have checked the field, and I can update it manually no problem. If I check the node itself before setting the value the "CanEdit" bool is set to "True". The last puzzling thing is that this code works fine for setting fields during the on load event.
This is the code I'm using to try and set the value of the field:
PathNavigator xnMyForm = MainDataSource.CreateNavigator();
xnMyForm.SelectSingleNode("//my:" + fieldName, NamespaceManager).SetValue(param);
The rule I'm using only has a condition which is "The expression" and xdExtension:UpdateFields()". I don't think this is the problem though, as the method is being called correctly.
If anyone can help me out with a solution, or how to investigate this problem further, I'd be most grateful.
Cheers -- Stuart