This should be pretty straightforward, but for some reason, I cannot get treeview to validate properly: the required field validator fails to see when a node is checked, even if ALL nodes are checked. This is a sample code:
The above is similar to the Validation Selection demo. Am I missing something?
Thanks,
Ivan
<asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please review the following errors:" ShowMessageBox="True" ShowSummary="false" DisplayMode="BulletList" /> |
<telerik:RadTreeView ID="RadTreeViewStates" runat="server" CheckBoxes="true" CheckChildNodes="true" TriStateCheckBoxes="true" LoadingMessage="Loading states" Skin="Office2007"> |
<Nodes> |
<telerik:RadTreeNode Checkable="true" Text="All States" Expanded="true"> |
<Nodes> |
<telerik:RadTreeNode Checkable="true" Text="Northeast"> |
<Nodes> |
<telerik:RadTreeNode Checkable="true" Text="CT" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="MA" Value="MA"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="ME" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="NH" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="NY" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="PA" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="RI" Value="CT"></telerik:RadTreeNode> |
<telerik:RadTreeNode Checkable="true" Text="VT" Value="CT"></telerik:RadTreeNode> |
</Nodes> |
</telerik:RadTreeNode> |
</Nodes> |
</telerik:RadTreeNode> |
</Nodes> |
</telerik:RadTreeView> |
<asp:RequiredFieldValidator ID="rvRadTreeViewStates" runat="server" ErrorMessage="Please select at least one state" Display="Dynamic" ControlToValidate="RadTreeViewStates">*</asp:RequiredFieldValidator> |
<asp:Button ID="ButtonSaveSearch" runat="server" Text="Save" /> |
The above is similar to the Validation Selection demo. Am I missing something?
Thanks,
Ivan