Formview - Binding to edit

My formview is having an issue. I have two dropdown boxes. Facility and Department. The department list is dependent facility. So I call the facility and then then pull the department where facility is equal to what is in that first dropdown. For example.. First dropdown box is Microsoft and the dropdown list all the departments. Then I using SelectedValue = (Bind etc etc) to get the specific Facility (Microsoft) and department that is associated with the formview record.
This all works fine.
Now the issue. If the user wants to edit that facility or department, it does not work. I get an error on the Bind. Because when I change the facility, the department list needs to change and the Bind is no longer valid.
So how do I get the field to unbind from the formview when the facility is changed?
If it is not possible, suggestions on how make this form user friendly.

This form is create by a user. When they submit it, another user gets the email. That user logs in and looks at the original submission and they may need to make changes like directly informaton to a differnt department.

Yeah, this is a known issue with the way databinding works and a bit awkward to get around.
What I tend to do is remove the SelectedValue = '<%#Bind.....' from the dropdownlist that has its items updated, then in the OnUpdating event of whichever datasource type you are using manually get the value out of the formview using FindControl and plug that into the updateparameters, business object or whatever you are using.

It's a bit difficult to give a concrete example without knowing the datasource you are using. Is it a sqldatasource, object data source etc?

OK, in your sqldatasource add the following: OnUpdating="sqlds_Updating" OnInserting="sqlds_Updating"
You'll also need a parameter in updateparameters and insertparameters that correspond to the field name:

<asp:Parameter Name="fieldName" Type="Int32" DefaultValue="0" />

Then in your code behind add a method to handle this event and get the values out of the FormView and put them into the parameters:

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…

In this Article, I will provide a few tips in problem and solution manner.
Opening an ASPX page in Visual studio 2003 is very slow.
To make it fast, please do follow below steps:
Open the Solution/Project.
Right click the ASPX file to b…

In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes.
Assigning simple products to configurable: We assigned simple products…