How to set the value of an existing radio button

Q:
The only problem that remains is trying to set the value of an existing
radio button.

The following code successfully creates the radio buttons:

PDFNet.Initialize();

PDFDoc doc = new PDFDoc();
Page blank_page = doc.PageCreate();

Field emp_last_radio1 = doc.FieldCreate("radio1", Field.Type.e_radio);

Annot annot10 = Annot.CreateWidget(doc, new Rect(200, 356, 256, 410),
emp_last_radio1); annot10.SetAppearance(CreateCheckmarkAppearance(doc),
Annot.AnnotationState.e_normal, "Paul");
blank_page.AnnotPushBack(annot10);

Annot annot11 = Annot.CreateWidget(doc, new Rect(200, 420, 256, 474),
emp_last_radio1); annot11.SetAppearance(CreateCheckmarkAppearance(doc),
Annot.AnnotationState.e_normal, "Robert");
blank_page.AnnotPushBack(annot11);

Annot annot12 = Annot.CreateWidget(doc, new Rect(200, 480, 256, 534),
emp_last_radio1); annot12.SetAppearance(CreateCheckmarkAppearance(doc),
Annot.AnnotationState.e_normal, "James");
blank_page.AnnotPushBack(annot12);

Annot annot13 = Annot.CreateWidget(doc, new Rect(200, 540, 256, 594),
emp_last_radio1); annot13.SetAppearance(CreateCheckmarkAppearance(doc),
Annot.AnnotationState.e_normal, "Chris");
blank_page.AnnotPushBack(annot13);

doc.PagePushBack(blank_page); // Add the page as the last page in the
document.

doc.Save(@"c:\test.pdf", 0);
doc.Close();

..and then we run the following to subsequently set the radio button -
but it only works if we set the first value. I can see the result of
the Field.SetValue change the /V tag of the radio button to the correct
value - but it doesn't seem to then select the correct
anotation/appearance:

PDFNet.Initialize();

PDFDoc doc = new PDFDoc(@"c:\test.pdf");

FieldIterator itr;
Field field;

itr = doc.FieldFind("radio1");
field = itr.Current();
field.SetValue(Obj.CreateName("James"));

doc.Save(@"c:\test.pdf", 0);
doc.Close();
-----
A:

Besides setting the correct value, you also need to select the
appropriate 'appearance'.
PDFNet will do this automatically if you call filed.RefreshAppearance()
after setting the value.

Otherwise, you need to manually set the active appearance ('AS' entry
in the field dictionary) to the corresponding appearance stream.