-
Hi, Patrick --
So the code you put in the post before this works for you? And your form has to be in full trust for it to work in preview? Is your machine part of a domain? I ask because of this post by Greg Collins on his blog -- apparently there are issues with that.
-
Hi, Catharine:
I suspect your xpath in that line does not point to a valid node. Given your data structure, I would expect "my:Name1" for the first line and "my:Comment1" for the second.
-
Hi, zeroecho:
The problem is your XPath. You are redirecting back to the root and selecting from there (which gives you the first one....) Let's say that your button is in a table connected to "my:TimeReporting". You would want e.Source.SelectSingleNode("my:PerActivity", NamespaceManager). e.Source will get you the ...
-
Hey, zeroecho:
If you have a button in a repeating table, it knows where it is -- look at this on ClickedEventArgs memebers at MSDN. So, instead of using MainDataSource.CreateNavigator(), you'd use:
XPathNavigator field4 = e.Source.SelectSingleNode("my:field4", NamespaceManager);
MessageBox.Show(field4.Value);
to pop up the ...
-
All the values for one column change, but not the other? Do you have a rule set somewhere that may be running and setting all the values for that column?
-
I usually just clone the last node in the table or clone it from the sampledata.xml. Here is some sample code that clones the last node of a repeating group and fills values:
//get values from a couple of fields
string xpath = "/my:myFields/my:field1";
XPathNavigator field1 = MainDataSource.CreateNavigator().SelectSingleNode(xpath, ...
-
I would make it a regular section, not optional, and use conditional formatting to show/hide it. You could even use a set of option buttons to show/hide and base the conditional formatting off that.
As far as a way to modify this functionality using code, you may want to look at this on MSDN on the View.ExecuteAction method.
-
Hey there --
If you want to use the code you have, it seems that you need to replace "Cell 1", "Cell 2" etc with the reference to the field in your form that has the value. So, if the code in your second sample is pointed to the nodes you want, you might be able to get away with something like this:
string myNamespace = ...
-
Hi, Drew:
I'm sorry, I'm afraid I don't quite understand what you want to do. You want to remove an optional section after it has been filled out? Removing it would also remove the data. How about just hiding it? You could add a helper field to your data source with a boolean data type, and give the user a button to click for ...
-
Here is a link to the MSDN documentation on the SwitchView method. I would create a single view that has all three views in it (you can copy/paste the content of each view into a new view) and then when your user clicks the button, try switching the view, exporting the new view to pdf and switching back.
There may be a way to append each view to ...