D
David C
I have a GridView with a DropDownList control that is tied to an
SqlDataSource. It pulls from a table/view of staff people and is a
data-bound control linked to an ID column in the GridView data source. I
want to be able to show only the active staff people in the DropDownList.
However, if I edit an old record with an ID tied to an inactive staff member
then the asp.net page throws an exception.
How do I best get around this so that I can show only the current ID staff
person and all the other "active" staff people? And where is the best place
to change my data source? I only care if I am editing the row. Below is my
data source SQL. Thanks.
<asp:SqlDataSource ID="SqlvwStaffPick" runat="server"
ConnectionString="<%$ ConnectionStrings:FiledataConnectionString %>"
SelectCommand="SELECT [PersonID], [Person] FROM [vw_StaffPick]
ORDER BY [Person]">
</asp:SqlDataSource>
David
SqlDataSource. It pulls from a table/view of staff people and is a
data-bound control linked to an ID column in the GridView data source. I
want to be able to show only the active staff people in the DropDownList.
However, if I edit an old record with an ID tied to an inactive staff member
then the asp.net page throws an exception.
How do I best get around this so that I can show only the current ID staff
person and all the other "active" staff people? And where is the best place
to change my data source? I only care if I am editing the row. Below is my
data source SQL. Thanks.
<asp:SqlDataSource ID="SqlvwStaffPick" runat="server"
ConnectionString="<%$ ConnectionStrings:FiledataConnectionString %>"
SelectCommand="SELECT [PersonID], [Person] FROM [vw_StaffPick]
ORDER BY [Person]">
</asp:SqlDataSource>
David