Thanks,
Anne Chinn
<telerik:RadWindow ID="AssignTasksWnd" runat="server" ShowContentDuringLoad="true" Width="800px"
Height="600px" Title="Assign Tasks To Students" Behaviors="Close" OnClientClose="refreshGrid">
<ContentTemplate>
<uc:TaskGrid ID="TaskGrid1" runat="server" Visible="true" />
</ContentTemplate>
</telerik:RadWindow>
Here's the TaskGrid control
<
telerik:RadGrid runat="Server" ID="TaskGrid" GridLines="Both" Height="100%"
BorderWidth="1" ShowGroupPanel="true"
AllowSorting="true" AllowPaging="false" AllowFilteringByColumn="true"
ShowHeader="true"
ClientEvents-OnRowClick="onGridRowClicked"
ClientSettings-Selecting-AllowRowSelect="true"
AllowMultiRowSelection="true"
OnUpdateCommand="TaskGrid_UpdateCommand"
OnDeleteCommand="TaskGrid_DeleteCommand"
OnInsertCommand="TaskGrid_InsertCommand"
OnNeedDataSource="TaskGrid_NeedDataSource"
OnItemDataBound="TaskGrid_ItemDataBound">
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="True" />
</ClientSettings>
<GroupingSettings ShowUnGroupButton="true" />
<MasterTableView AutoGenerateColumns="False"
CommandItemDisplay="Top"
NoMasterRecordsText="No tasks found."
ClientDataKeyNames="ReadingTaskID, EntityCode, CreatedBy">
<CommandItemSettings AddNewRecordText="Add New Task" />
<ExpandCollapseColumn Visible="True" >
</ExpandCollapseColumn>
<Columns>
<telerik:GridClientSelectColumn HeaderText="Select" UniqueName="Select" Groupable="false"/>
<telerik:GridEditCommandColumn UniqueName="EditCommand" />
<telerik:GridBoundColumn Groupable="true" DataField="EntityName" HeaderText="Owner" ItemStyle-Wrap="false"
SortExpression="EntityName" UniqueName="EntityName" />
<telerik:GridBoundColumn Groupable="true" DataField="ReadingTaskType" HeaderText="Type"
SortExpression="ReadingTaskType" UniqueName="ReadingTaskType" ItemStyle-Wrap="false" />
<telerik:GridBoundColumn Groupable="false" DataField="ShortName" HeaderText="ShortName"
SortExpression="ShortName" UniqueName="ShortName" />
<telerik:GridBoundColumn Groupable="false" DataField="Title" HeaderText="Title"
SortExpression="Title" UniqueName="Title" />
<telerik:GridButtonColumn CommandName="Delete" Text="Delete"
UniqueName= "DeleteCommand" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="Delete record confirmation" />
</Columns>
<EditFormSettings EditFormType="Template" >
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormTemplate>
<table ID="Table2" border="0" cellpadding="0" cellspacing="2" width="100%">
<tr>
<td>
<table ID="Table3" cellpadding="5" cellspacing="1" width="100%">
<tr>
<td colspan="2">
<b><asp:Label ID="EditTaskTitle" runat="server" Text="Edit Task" /></b>
</td>
</tr>
<tr>
<td nowrap>
Short Name:
</td>
<td>
<asp:TextBox ID="ShortName" runat="server" MaxLength="20" />
<asp:RequiredFieldValidator ID="RFV_ShortName" runat="server" ControlToValidate="ShortName" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td nowrap>
Title and Author of Text:
</td>
<td>
<asp:TextBox ID="TaskTitle" runat="server" Width="600px" />
<asp:RequiredFieldValidator ID="RFV_TaskTitle" runat="server" ControlToValidate="TaskTitle" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td nowrap>
Task Type:
</td>
<td>
<asp:DropDownList ID="TaskType" runat="server" OnSelectedIndexChanged="OnChangeTaskType" AutoPostBack="true">
<asp:ListItem Text="Literary" Value="1" />
<asp:ListItem Text="Informational" Value="2" />
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Panel ID="Edit_LiteraryTextPanel" runat="server" Visible="true">
<table cellpadding="2" cellspacing="0" class="General" width="100%">
<tr>
<td class="DefaultHeaderCell">
Active
</td>
<td class="DefaultHeaderCell">
Strand
</td>
<td class="DefaultHeaderCell">
Target
</td>
<td class="DefaultHeaderCell" width="100%">
Question
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Lit_Active1" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeLCActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
LC (Literary Comprehension)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Lit_Target1" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="LC01" Value="1" />
<asp:ListItem Text="LC02" Value="2" />
<asp:ListItem Text="LC03" Value="3" />
<asp:ListItem Text="LC04" Value="4" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Lit_Target1"
ControlToValidate="Lit_Target1"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Lit_Prompt1" runat="server" Rows="4" TextMode="MultiLine" Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Lit_Prompt1" runat="server" Enabled="false" ControlToValidate="Lit_Prompt1" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Lit_Active2" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeLAActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
LA (Literary Analysis)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Lit_Target2" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="LA05" Value="5" />
<asp:ListItem Text="LA06" Value="6" />
<asp:ListItem Text="LA07" Value="7" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Lit_Target2"
ControlToValidate="Lit_Target2"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Lit_Prompt2" runat="server" Rows="4" TextMode="MultiLine" Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Lit_Prompt2" runat="server" Enabled="false" ControlToValidate="Lit_Prompt2" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Lit_Active3" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeLTActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
LT - (Literary Thinking Critically)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Lit_Target3" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="LT08" Value="8" />
<asp:ListItem Text="LT09" Value="9" />
<asp:ListItem Text="LT10" Value="10" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Lit_Target3"
ControlToValidate="Lit_Target3"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Lit_Prompt3" runat="server" Rows="4" TextMode="MultiLine" Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Lit_Prompt3" runat="server" Enabled="false" ControlToValidate="Lit_Prompt3" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
</table>
<br />
</asp:Panel>
<asp:Panel ID="Edit_InfoTextPanel" runat="server" Visible="true">
<table cellpadding="2" cellspacing="0" class="General" width="100%">
<tr>
<td class="DefaultHeaderCell">
Active
</td>
<td class="DefaultHeaderCell">
Strand
</td>
<td class="DefaultHeaderCell">
Target
</td>
<td class="DefaultHeaderCell" width="100%">
Question
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Info_Active1" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeICActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
IC (Informational Comprehension)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Info_Target1" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="IC11" Value="11" />
<asp:ListItem Text="IC12" Value="12" />
<asp:ListItem Text="IC13" Value="13" />
<asp:ListItem Text="IC14" Value="14" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Info_Target1"
ControlToValidate="Info_Target1"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Info_Prompt1" runat="server" Rows="4" TextMode="MultiLine"
Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Info_Prompt1" runat="server" Enabled="false" ControlToValidate="Info_Prompt1" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Info_Active2" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeIAActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
IA (Informational Analysis)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Info_Target2" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="IA15" Value="15" />
<asp:ListItem Text="IA16" Value="16" />
<asp:ListItem Text="IA17" Value="17" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Info_Target2"
ControlToValidate="Info_Target2"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Info_Prompt2" runat="server" Rows="4" TextMode="MultiLine"
Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Info_Prompt2" runat="server" Enabled="false" ControlToValidate="Info_Prompt2" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="Info_Active3" runat="server" AutoPostBack="true"
OnCheckedChanged="OnChangeITActiveCB" />
</td>
<td class="DefaultGridCell" nowrap valign="top">
IT - (Informational Thinking Critically)
</td>
<td class="DefaultGridCell" valign="top">
<asp:DropDownList ID="Info_Target3" runat="server">
<asp:ListItem Text="Select" Value="0" />
<asp:ListItem Text="IT18" Value="18" />
<asp:ListItem Text="IT19" Value="19" />
<asp:ListItem Text="IT20" Value="20" />
</asp:DropDownList>
<asp:CompareValidator ID="RFV_Info_Target3"
ControlToValidate="Info_Target3"
Operator="notEqual"
ValueToCompare="0"
ErrorMessage="*Required"
Enabled="false"
runat="server"
/>
</td>
<td class="DefaultGridCell" valign="top">
<asp:TextBox ID="Info_Prompt3" runat="server" Rows="4" TextMode="MultiLine"
Width="99%" />
<asp:RequiredFieldValidator ID="RFV_Info_Prompt3" runat="server" Enabled="false" ControlToValidate="Info_Prompt3" Display="Dynamic" EnableClientScript="true" ErrorMessage="*Required" />
</td>
</tr>
</table>
<br></br>
</asp:Panel>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right">
<asp:Button ID="btnUpdate" runat="server"
CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'
Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Insert" : "Update" %>' />
<asp:Button ID="btnCancel" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
<NestedViewTemplate>
<table ID="Table2" border="0" cellpadding="1" cellspacing="2" rules="none" width="100%">
<tr>
<td>
<table ID="Table3" cellpadding="5" cellspacing="1" width="100%">
<tr>
<td colspan="2"><b>Task Details</b></td>
</tr>
<tr>
<td nowrap>
Short Name:
</td>
<td>
<asp:Label ID="NVT_ShortName" runat="server" Text='<%# Bind( "ShortName" ) %>'
Width="600px" />
</td>
</tr>
<tr>
<td nowrap>
Title and Author of Text:
</td>
<td>
<asp:Label ID="NVT_Title" runat="server" Text='<%# Bind( "Title" ) %>'
Width="600px" />
</td>
</tr>
<tr>
<td nowrap>
Task Type:
</td>
<td>
<asp:Label ID="NVT_TaskType" runat="server"
Text='<%# Convert.ToString((COEStudentLib.ReadingTaskType)Convert.ToInt16(Eval("ReadingTaskTypeID" ))) %>' />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Panel ID="NVT_LiteraryTextPanel" runat="server"
Visible='<%# (COEStudentLib.ReadingTaskType)Convert.ToInt16(Eval("ReadingTaskTypeID" ))==COEStudentLib.ReadingTaskType.Literary %>'>
<table cellpadding="2" cellspacing="0" class="General" width="100%">
<tr>
<td class="DefaultHeaderCell">
Active
</td>
<td class="DefaultHeaderCell">
Strand
</td>
<td class="DefaultHeaderCell">
Target
</td>
<td class="DefaultHeaderCell" width="100%">
Question
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="LCActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt1")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeLCActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
LC (Literary Comprehension)
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_LCTarget" runat="server" Text='<%# Bind( "Target1" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_LCQuestion" runat="server" Text='<%# Bind( "Prompt1" ) %>' />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="LAActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt2")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeLAActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
LA (Literary Analysis)
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_LATarget" runat="server" Text='<%# Bind( "Target2" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_LAQuestion" runat="server" Text='<%# Bind( "Prompt2" ) %>' />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="LTActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt3")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeLTActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
LT (Literary Thinking Critically)
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_LTTarget" runat="server" Text='<%# Bind( "Target3" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NTV_LTQuestion" runat="server" Text='<%# Bind( "Prompt3" ) %>' />
</td>
</tr>
</table>
<br />
</asp:Panel>
<asp:Panel ID="NVT_InfoTextPanel" runat="server"
Visible='<%# (COEStudentLib.ReadingTaskType)Convert.ToInt16(Eval("ReadingTaskTypeID" ))==COEStudentLib.ReadingTaskType.Informational %>'>
<table cellpadding="2" cellspacing="0" class="General" width="100%">
<tr>
<td class="DefaultHeaderCell">
Active
</td>
<td class="DefaultHeaderCell">
Strand
</td>
<td class="DefaultHeaderCell">
Target
</td>
<td class="DefaultHeaderCell" width="100%">
Question
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="ICActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt1")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeICActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
IC (Informational Comprehension)
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_ICTarget" runat="server" Text='<%# Bind( "Target1" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_ICQuestion" runat="server" Text='<%# Bind( "Prompt1" ) %>' />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="IAActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt2")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeIAActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
IA (Informational Analysis))
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_IATarget" runat="server" Text='<%# Bind( "Target2" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_IAQuestion" runat="server" Text='<%# Bind( "Prompt2" ) %>' />
</td>
</tr>
<tr>
<td align="center" class="DefaultGridCell" valign="top">
<asp:CheckBox ID="ITActiveCB" runat="server" AutoPostBack="true"
Checked='<%#Convert.ToString(Eval("Prompt3")).Length > 0 %>' Enabled="false"
OnCheckedChanged="OnChangeITActiveCB" />
</td>
<td class="DefaultGridCell" nowrap>
IT - (Informational Thinking Critically)
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_ITTarget" runat="server" Text='<%# Bind( "Target3" ) %>' />
</td>
<td class="DefaultGridCell">
<asp:Label ID="NVT_ITQuestion" runat="server" Text='<%# Bind( "Prompt3" ) %>' />
</td>
</tr>
</table>
<br />
</asp:Panel>
</td>
</tr>
</table>
</td>
</tr>
</table>
</NestedViewTemplate>
</MasterTableView>
<ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" />
</
telerik:RadGrid>