Posted on: 10/17/2012 10:18:41 PM | Views : 446

Hi,
I have a DetailsView that is bound to an ObjectDataSource that pulls data from a Business class.
<asp:DetailsView ID="dvwForum" runat="server" AutoGenerateRows="False" DataSourceID="objCurrForum" DataKeyNames="ID" OnItemCreated="dvwForum_ItemCreated" DefaultMode="Insert" > <FieldHeaderStyle Width="100px" /> <Fields> .................................... <asp:TemplateField HeaderText="Forum Access Rights"> <ItemTemplate> <asp:DropDownList ID="rolesDDL" runat="server"></asp:DropDownList> </ItemTemplate> </asp:TemplateField> ............................................................. </Fields> </asp:DetailsView>
The DetailViews OnItemCreated event calls dvwForum_ItemCreated that checks to see if in InsertMode and if so populates the drop dwon list with all the current Roles. Go to the complete details ...