Posted on: 6/23/2012 8:19:29 PM | Views : 263

I have two tables one is called RestTable with the following columns TableID, ServerID, TableNumber and the other table is called Server with the following columns ServerID and ServerName.  What I want to do is when edit is clicked the ServerID column is a dropdownlist displaying the names, but when a name is selected the ServerID is saved to the RestTable.  My code is as follows:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TableID" DataSourceID="SqlDataSourceTable"> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:BoundField DataField="TableID" HeaderText="TableID" InsertVisible="False" ReadOnly="True" SortExpression="TableID" Visible="False" /> <asp:BoundField DataField="RestaurantID" HeaderText="RestaurantID" SortExpression="RestaurantID" Visible="False" /> ...

Go to the complete details ...