This is a migrated thread and some comments may be shown as answers.

RadInputManager with Radpanelbar or RadMenu

4 Answers 42 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
David Blok
Top achievements
Rank 1
David Blok asked on 23 Dec 2009, 12:31 PM
I have a problem with the validator of the radinputmanager

If i have a form on the page with the radinputmanager and fields are set on

-> Validation-IsRequired="true"

 


Then the links on the panelbar and radmenu isn't working anymore.
When the forms are not require validation, the menu works again.

Anyone has an idea ?

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 Dec 2009, 12:10 PM
Hello David,

I used this demo and added the following RadMenu instance to test the case, but the link worked as expected:

<telerik:RadMenu ID="RadMenu1" runat="server">
       <Items>
           <telerik:RadMenuItem Text="google" NavigateUrl="http://www.google.com">
           </telerik:RadMenuItem>
       </Items>
   </telerik:RadMenu>

Are there any specific settings in your test case that we should be aware of?


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
David Blok
Top achievements
Rank 1
answered on 04 Jan 2010, 09:31 AM
Hi,

Well here is the screnario

The data populated with the panel comes from below:
 Private Sub BindToDataSet()  
 
        Dim adapter As New SqlDataAdapter("SELECT * FROM TblPages where MenuID = " + MenuIDvalue, _  
            ConfigurationManager.ConnectionStrings("Varodb").ConnectionString)  
 
        Dim Menu As New DataSet()  
 
        adapter.Fill(Menu)  
 
        panelmenu1.DataTextField = "Pagename" 
        panelmenu1.DataFieldID = "ID" 
        panelmenu1.DataFieldParentID = "PageID" 
 
        panelmenu1.DataSource = Menu  
        panelmenu1.DataBind()  
 
 
 
    End Sub 
 
    Protected Sub panelmenu1_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles panelmenu1.ItemDataBound  
        Dim dataRow As DataRowView = DirectCast(e.Item.DataItem, DataRowView)  
        e.Item.Attributes("PageID") = dataRow("ID").ToString()  
    End Sub 
 
    Protected Sub RadPanelBar1_ItemClick(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadPanelBarEventArgs)  
 
        Threading.Thread.Sleep(200)  
        Response.Redirect("~/?Node=" + e.Item.Attributes("PageID"))  
 
    End Sub 
 
    Protected Sub panelmenu1_PreRender(ByVal sender As ObjectByVal e As EventArgs)  
        Dim selectedItem As RadPanelItem = panelmenu1.SelectedItem  
    End Sub 

Below is the form code :
<table width="100%">  
    <tr> 
        <td>Company</td> 
        <td><asp:TextBox ID="companybox" runat="server" /></td>  
        <td>E-Mail</td> 
        <td><asp:TextBox ID="emailbox" runat="server" Text="" /></td>  
    </tr> 
    <tr> 
        <td>Adres</td> 
        <td><asp:TextBox ID="adresbox" runat="server" /> 
</td> 
        <td>Name</td> 
        <td><asp:TextBox ID="namebox" runat="server" /> 
</td> 
    </tr> 
    <tr> 
        <td>Area code</td> 
        <td><asp:TextBox ID="areacodebox" runat="server" /> 
</td> 
        <td>Phone</td> 
        <td><asp:TextBox ID="telbox" runat="server" /> 
</td> 
    </tr> 
    <tr> 
        <td>City</td> 
        <td><asp:TextBox ID="citybox" runat="server" /> 
</td> 
        <td>Cell</td> 
        <td><asp:TextBox ID="cellbox" runat="server" /> 
</td> 
    </tr> 
    <tr> 
        <td>Country</td> 
        <td><asp:TextBox ID="countrybox" runat="server" /> 
</td> 
        <td></td>  
        <td></td>  
    </tr> 
    <tr> 
        <td colspan="4" height="10"></td> 
    </tr> 
    <tr> 
        <td colspan="4">Bericht</td> 
    </tr> 
    <tr> 
        <td colspan="4">  
            <asp:TextBox ID="messagebox" TextMode="MultiLine" Rows="5" Width="90%" runat="server"></asp:TextBox> 
        </td> 
    </tr> 
    <tr> 
        <td colspan="4"><asp:Button ID="contactformsubbtn" runat="server" Text="Verzenden" /></td>  
    </tr> 
</table> 
</div> 
 
<telerik:RadInputManager ID="RadInputManager1" runat="server">  
<telerik:RegExpTextBoxSetting BehaviorID="reqboxcheck" ValidationExpression="[0-9, A-Z, a-z]{2,}" ErrorMessage="LEER IS TYPE!!">  
    <TargetControls> 
        <telerik:TargetInput ControlID="companybox" /> 
        <telerik:TargetInput ControlID="adresbox" /> 
        <telerik:TargetInput ControlID="companybox" /> 
        <telerik:TargetInput ControlID="areacodebox" /> 
        <telerik:TargetInput ControlID="citybox" /> 
        <telerik:TargetInput ControlID="messagebox" /> 
        <telerik:TargetInput ControlID="countrybox" /> 
    </TargetControls> 
</telerik:RegExpTextBoxSetting> 
 
 
<telerik:RegExpTextBoxSetting BehaviorID="namecheck" ValidationExpression="[A-Z, a-z]{2,}" ErrorMessage="LEER IS TYPE!!">  
    <TargetControls> 
        <telerik:TargetInput ControlID="namebox" /> 
    </TargetControls> 
</telerik:RegExpTextBoxSetting> 
 
 
<telerik:RegExpTextBoxSetting BehaviorID="emailcheck" ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="Invalid Email">  
    <TargetControls> 
        <telerik:TargetInput ControlID="emailbox" /> 
    </TargetControls> 
</telerik:RegExpTextBoxSetting> 
 
 
<telerik:RegExpTextBoxSetting BehaviorID="phonecheck" ValidationExpression="[0-9, +]{8,}" ErrorMessage="en nu de echte ...">  
    <TargetControls> 
        <telerik:TargetInput ControlID="telbox" /> 
        <telerik:TargetInput ControlID="cellbox" /> 
    </TargetControls> 
</telerik:RegExpTextBoxSetting> 
</telerik:RadInputManager> 

When one of the validation comes up then the panelitems link doesn't work anymore.
Once i fill a correct value inside the input field, the panelbar works again
0
Accepted
Veselin Vasilev
Telerik team
answered on 06 Jan 2010, 04:45 PM
Hi David Blok,

Please try setting the CausesValidation property of the panelbar to False.

Regards,
Veskoni
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
David Blok
Top achievements
Rank 1
answered on 12 Jan 2010, 09:23 AM
Great it works perfectly now, Many Thanks
Tags
PanelBar
Asked by
David Blok
Top achievements
Rank 1
Answers by
Peter
Telerik team
David Blok
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or