Hi forum heros!
I have a page that has a formview on it. Client info, name, address, usual stuff. The formview is populated by a DataSource, that calls a SQL stored procedure for the client info. It all works great.
Within the formview, I have a dropdownlist for the Staff assigned to the client (StaffId is a member of the Client record called during the Formview binding). When the formview is in Item mode, the Staff name appears in a label, when in Edit mode, the dropdownlist is bound and populated by another DataSource that calls a stored procedure of ActiveStaff. When the assigned staff exists, the StaffId is correctly bound to the DDL SelectedValue and the current staff name appears selected in the DDL when in edit mode, as it should.
So here's the problem:
Staff quit and become inactive. So when the client record is pulled up, the StaffId (bound from the Formview) is no longer in the ActiveStaff list (used in the DDL) and the DropDownList bind fails (loudly - not sure why it couldn't just fail to zero, but there you go).
Anyway, I know how to check for whether a record exists and manually bind dropdownlists that are outside formviews, but is it even possible within a formview?
Any direction here would be appreciated. Thanks in advance.
View Complete Post