Hi, I have a RadGrid bringing data back from the database. When I add a new Item I have several ComboBoxes. The first is populated when the EditForm opens. I next want to bind the next ComboBox with the selected value of the first ComboBox when the selected value changes. How do I do it?
I have another 3 ComboBoxes (not shown yet) that will continue in the same way as each selected value changes.
<telerik:RadGrid DataSourceID="dsActionList" ID="rdgActions" runat="server" CellSpacing="0"
GridLines="None" AllowPaging="True" PageSize="10" EnableHeaderContextMenu="True"
AutoGenerateColumns="False" ShowStatusBar="True">
<ItemStyle CssClass="ItemStyle" />
<PagerStyle Mode="NumericPages"></PagerStyle>
<ClientSettings EnableRowHoverStyle="True">
</ClientSettings>
<AlternatingItemStyle CssClass="AlternatingItemStyle" />
<MasterTableView GridLines="None" CellSpacing="0" runat="server" DataKeyNames="PlanTestActionID"
CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Action">
<Columns>
<telerik:GridTemplateColumn UniqueName="ViewEdit">
<ItemTemplate>
<asp:LinkButton Text='<%# Bind("ViewEditText") %>' runat="server" ID="btnViewEdit"
CommandName="Edit" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderText="Business Area" UniqueName="BusinessArea" DataField="BusinessAreaDesc">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Plan Description" UniqueName="PlanDescription"
DataField="PlanDescription">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Actual Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="ActualDate" DataField="ActualDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Action Title" UniqueName="ActionTitle" DataField="ActionTitle">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Target Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="TargetDate" DataField="TargetDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Action User" UniqueName="ActionUser" DataField="ActionUser">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Originator" UniqueName="Originator" DataField="Originator">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Completed Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="CompletedDate" DataField="CompletedTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Approved Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="ApprovedDate" DataField="ApprovedTime">
</telerik:GridBoundColumn>
<%--Hide the next 3 checkboxes and Date but give them a default insert value--%>
<telerik:GridBoundColumn HeaderText="Cancelled Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="CancelledDate" DataField="CancelledDate" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Cancelled" DataType="System.Boolean"
UniqueName="hCancelled" Visible="False">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Completed" DataType="System.Boolean"
UniqueName="hCompleted" Visible="False">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Approved" DataType="System.Boolean"
UniqueName="hApproved" Visible="False">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings EditFormType="Template" PopUpSettings-Modal="True">
<FormStyle BackColor="#E0ECFE"></FormStyle>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
<FormTemplate>
<asp:HiddenField ID="hdnPlanTestActionID" runat="server" Value='<%# Bind("PlanTestActionID") %>' />
<asp:HiddenField ID="ViewEdit" runat="server" Value='<%# Bind("ViewEdit") %>' />
<table>
<tr runat="server" id="trOriginatorDetails">
<td>
<asp:Label ID="Label34" runat="server" Text="Created By:"></asp:Label>
</td>
<td>
<asp:Label ID="lblOriginatorUserID" runat="server" Text='<%# Bind("Originator") %>'></asp:Label>
</td>
<td width="50px">
</td>
<td>
<asp:Label ID="Label50" runat="server" Text="Create Time:"></asp:Label>
</td>
<td>
<asp:Label ID="lblCreateTime" runat="server" Text='<%# Bind("CreateTime", "{0:dd MMM yyyy}") %>'></asp:Label>
</td>
</tr>
<tr runat="server" id="trDropDowns">
<td>
<asp:Label ID="Label2" runat="server" Text="Select Business Area:"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Select Business Component:"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="ddlBusinessArea" runat="server" DataSourceID="dsBusinessAreaList"
DataTextField="BusinessAreaDesc" DataValueField="BusinessAreaID" AppendDataBoundItems="True"
AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem Text="" Value="0" />
</Items>
</telerik:RadComboBox>
<br />
<telerik:RadComboBox ID="ddlBusinessComponent" runat="server" DataSourceID="dsBusinessComponentList"
DataTextField="ProcessDesc" DataValueField="ProcessID" AppendDataBoundItems="True"
AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem Text="" Value="0" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
.
.
.
<tr>
<td height="50">
</td>
<td>
<asp:LinkButton ID="btnUpdate" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'></asp:LinkButton>
<asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:LinkButton>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView><HeaderStyle Font-Bold="True" />
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Outlook">
</HeaderContextMenu>
</telerik:RadGrid>
I have another 3 ComboBoxes (not shown yet) that will continue in the same way as each selected value changes.
<telerik:RadGrid DataSourceID="dsActionList" ID="rdgActions" runat="server" CellSpacing="0"
GridLines="None" AllowPaging="True" PageSize="10" EnableHeaderContextMenu="True"
AutoGenerateColumns="False" ShowStatusBar="True">
<ItemStyle CssClass="ItemStyle" />
<PagerStyle Mode="NumericPages"></PagerStyle>
<ClientSettings EnableRowHoverStyle="True">
</ClientSettings>
<AlternatingItemStyle CssClass="AlternatingItemStyle" />
<MasterTableView GridLines="None" CellSpacing="0" runat="server" DataKeyNames="PlanTestActionID"
CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add Action">
<Columns>
<telerik:GridTemplateColumn UniqueName="ViewEdit">
<ItemTemplate>
<asp:LinkButton Text='<%# Bind("ViewEditText") %>' runat="server" ID="btnViewEdit"
CommandName="Edit" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn HeaderText="Business Area" UniqueName="BusinessArea" DataField="BusinessAreaDesc">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Plan Description" UniqueName="PlanDescription"
DataField="PlanDescription">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Actual Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="ActualDate" DataField="ActualDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Action Title" UniqueName="ActionTitle" DataField="ActionTitle">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Target Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="TargetDate" DataField="TargetDate">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Action User" UniqueName="ActionUser" DataField="ActionUser">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Originator" UniqueName="Originator" DataField="Originator">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Completed Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="CompletedDate" DataField="CompletedTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Approved Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="ApprovedDate" DataField="ApprovedTime">
</telerik:GridBoundColumn>
<%--Hide the next 3 checkboxes and Date but give them a default insert value--%>
<telerik:GridBoundColumn HeaderText="Cancelled Date" DataFormatString="{0:dd MMM yyyy}"
UniqueName="CancelledDate" DataField="CancelledDate" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Cancelled" DataType="System.Boolean"
UniqueName="hCancelled" Visible="False">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Completed" DataType="System.Boolean"
UniqueName="hCompleted" Visible="False">
</telerik:GridCheckBoxColumn>
<telerik:GridCheckBoxColumn DefaultInsertValue="false" DataField="Approved" DataType="System.Boolean"
UniqueName="hApproved" Visible="False">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings EditFormType="Template" PopUpSettings-Modal="True">
<FormStyle BackColor="#E0ECFE"></FormStyle>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
<FormTemplate>
<asp:HiddenField ID="hdnPlanTestActionID" runat="server" Value='<%# Bind("PlanTestActionID") %>' />
<asp:HiddenField ID="ViewEdit" runat="server" Value='<%# Bind("ViewEdit") %>' />
<table>
<tr runat="server" id="trOriginatorDetails">
<td>
<asp:Label ID="Label34" runat="server" Text="Created By:"></asp:Label>
</td>
<td>
<asp:Label ID="lblOriginatorUserID" runat="server" Text='<%# Bind("Originator") %>'></asp:Label>
</td>
<td width="50px">
</td>
<td>
<asp:Label ID="Label50" runat="server" Text="Create Time:"></asp:Label>
</td>
<td>
<asp:Label ID="lblCreateTime" runat="server" Text='<%# Bind("CreateTime", "{0:dd MMM yyyy}") %>'></asp:Label>
</td>
</tr>
<tr runat="server" id="trDropDowns">
<td>
<asp:Label ID="Label2" runat="server" Text="Select Business Area:"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="Select Business Component:"></asp:Label>
</td>
<td>
<telerik:RadComboBox ID="ddlBusinessArea" runat="server" DataSourceID="dsBusinessAreaList"
DataTextField="BusinessAreaDesc" DataValueField="BusinessAreaID" AppendDataBoundItems="True"
AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem Text="" Value="0" />
</Items>
</telerik:RadComboBox>
<br />
<telerik:RadComboBox ID="ddlBusinessComponent" runat="server" DataSourceID="dsBusinessComponentList"
DataTextField="ProcessDesc" DataValueField="ProcessID" AppendDataBoundItems="True"
AutoPostBack="True">
<Items>
<telerik:RadComboBoxItem Text="" Value="0" />
</Items>
</telerik:RadComboBox>
</td>
</tr>
.
.
.
<tr>
<td height="50">
</td>
<td>
<asp:LinkButton ID="btnUpdate" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'></asp:LinkButton>
<asp:LinkButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:LinkButton>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView><HeaderStyle Font-Bold="True" />
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Outlook">
</HeaderContextMenu>
</telerik:RadGrid>