Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Required Field Validator for RadComboBox with itemtemplate
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Required Field Validator for RadComboBox with itemtemplate

Feed from this thread
  • liju avatar

    Posted on May 27, 2011 (permalink)

    Hi,

    I have a combobox with itemtemplate and a div inside that and labels inside div.
    I want to do a required field validation on this? i tried to set empty data text, initial value to the combo text etc. but nothing works.
    what are the options?

    Thanks

  • Posted on May 30, 2011 (permalink)

    Hello Liju,
    Try the following code which worked as expected at my end.
    aspx:
    <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true"
    runat="server" ValidationGroup="ValidationGroup1">
                <ItemTemplate>
                    <asp:CheckBox runat="server" ID="CheckBox1" />
                    <%# DataBinder.Eval(Container, "Text") %>
                </ItemTemplate>
                <Items>
                    <telerik:RadComboBoxItem Value="10/10/2010" Text="10/10/2010" />
                    <telerik:RadComboBoxItem Value="10/3/2010" Text="10/3/2010" />
                    <telerik:RadComboBoxItem Value="10/10/2010" Text="10/10/2010" />
                    <telerik:RadComboBoxItem Text="Date1" IsSeparator="true" />
                </Items>
    </telerik:RadComboBox>
    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="RadComboBox1"
                ErrorMessage="Please select a Date."  ValidationGroup="ValidationGroup1"/>
     <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" ValidationGroup="ValidationGroup1" />

    Also take a look at the following help article.
    validation.

    Thanks,
    Shinu.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Combobox > Required Field Validator for RadComboBox with itemtemplate