I basically have two versions of the form (look the same just about) that is controlled by a dropdown. The values are New (default) and Extension. When the user opens an existing form, and changes the value to Extension, others things happen and are already in place, such has changing text box values to old text box values and moving old end dates, to new start dates, etc.
What I would like to do is with a dropdownlist called ddlPO. If the original value was not = "NA", then I want "NA" removed from the dropdown list. I'm kinda used to working with VB in .NET apps, but this is all in C# out of my comfort zone.
I tried this: ( it errors because these properties like Items and Selected value don't exist in this fashion)
if
thisXDocument.DOM.selectSingleNode("/my:myFields/my:ddlPO").SelectedValue != "NA";
then
thisXDocument.DOM.selectSingleNode("/my:myFields/my:ddlPO").Items.RemoveAt(thisXDocument.DOM.selectSingleNode("/my:myFields/my:ddlPO").Items.IndexOf(thisXDocument.DOM.selectSingleNode("/my:myFields/my:ddlPO").Items.FindByValue("NA")));