I have a gridview which when selected will populate a detialsview. The problem I am running into is that I am using code behind to load my gridview and detailsview by accessing a stored procedure and filling a datalist. I have the gridview working. In the detailsview though, I can not access the properties within. I am not using an asp.sqldatasource or objectdatasource. How can I find the properties within that detailsview from code behind? I do not want to use an SqlDataSource or ObjectDataSource.
FOr example
FOr example
Code:
<asp:DetailsView Width="45%" HeaderStyle-CssClass="header" OnItemCommand="doInsert"
HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Center" HeaderText="Union Code Maintenance"
Visible="false" DataKeyNames="vchCode1" AutoGenerateRows="false" id="dvwCodes" runat="server" >
<Fields>
<asp:BoundField DataField="vchCode1" HeaderText=" Code Primary" />
<asp:BoundField DataField="vchCode2" HeaderText=" Code Secondary" />
<asp:BoundField DataField="vchBinder" HeaderText="Binder Number" />
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<asp:Label ID="lblStatus" runat="server" Text='<%Eval("vchStatus") %>'/>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlStatus" runat="server" >
<asp:ListItem Value="A">A</asp:ListItem>
<asp:ListItem Value="I">I</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowEditButton="true" ShowInsertButton="true" ButtonType="Button" ShowCancelButton="true" />
</Fields>
</asp:DetailsView>
[code]
I want to call a separate insert/update and get the values. I can find the values of the bound fields, but not of the ddl which is not bound.