<EditFormSettings EditFormType="Template">
<FormTemplate>
<div>
<h3>
New Team Culture Assessment
</h3>
<table>
<tr>
<td>
<asp:Label ID="EntitiesLabel" runat="server" Text="Entities"></asp:Label>
</td>
<td>
<asp:DropDownList ID="EntityList" runat="server" AutoPostBack="True"
OnSelectedIndexChanged = "Entity_selected"></asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="TeamsLabel" runat="server" Text="Teams"></asp:Label>
</td>
<td>
<asp:DropDownList ID="TeamList" runat="server">
</asp:DropDownList>
</td>
</tr>
</table>
</div>
</FormTemplate>
</EditFormSettings
>
My questions:
1. I want to populate the EntityList and TeamList drop-downs in the page-load using "object data source", but when I access them directly, I am getting an error saying that the name EntityList is not found in current context...here is what I am doing in !postback in page_load:
var bd = new BfEntityDAO();
List<BfEntity> ents = bd.GetEntities();
EntityList.DataSource = ents;
EntityList.DataTextField = "BfEntityName";
EntityList.DataBind();
How can I populate these drop-downs so that the user can see the values when he inserts a new item?
2. When the user opens the insert form and selects an entity from the entitylist drop-down, I want to populate the teamlist drop-down based on the value selected in the entitylist drop-down. How can I accomplish this?
This is the code snippet I am using currently in the codebehind, but the method is not being called:
3. Finally, when the user clicks OK on the form, I want a insert the data into the database from the code-behind file. How can I get a callback to method in the code-behind and how can I access the data entered by the user?
Thank you
<telerik:GridDateTimeColumn DataField="PostedDate" HeaderText="Posted Date" UniqueName="PostedDate" DataFormatString="{0:MMM dd, yyyy}" AllowFiltering="true" AllowSorting="true"CurrentFilterFunction="GreaterThanOrEqualTo" HeaderStyle-Font-Bold="true" PickerType="DatePicker" FilterControlWidth="40px" EnableRangeFiltering="False" EnableTimeIndependentFiltering="False"> <ItemStyle Width="50px"></ItemStyle> <HeaderStyle Width="50px"></HeaderStyle> </telerik:GridDateTimeColumn>