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

[VB.NET/Tabstrip + Panelbar] Hyperlinks not working properly

4 Answers 137 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michiel Peeters
Top achievements
Rank 1
Michiel Peeters asked on 17 May 2010, 08:30 AM
Dear Telerik Community,

First of all i'm sorry that i have question again about the MVC telerik controls. Its buggers me also that i run into problems which i cannot find a solution for it, because i do not know where to start with debugging in javascript.

In other threads i was talking that i want to create an ajax control in a ajax control in a ajaxconrol. So three ajax controls in total. To be more specific i have a gridcontrol inside a panelbar control where the panelbar control is inside a tabcontrol. Everything works fine execpt for one minor (maybe big) issue. Hyperlink like <a href="">value</a> are not responding to my clicks. Is this possible that javascript kicks in for <a href="">value</a> inside a control which gives me a return value of false? If needed i will seek into it for providing the project.

Kind regards,
Michiel Peeters

4 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 17 May 2010, 09:26 AM
Hello Michiel,

Depending on the given information, we believe that this is a known issue, which is already fixed. Could you try the build attached to this thread?

Kind regards,
Georgi Krustev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Michiel Peeters
Top achievements
Rank 1
answered on 17 May 2010, 09:35 AM
Dear Georgi,

Thank you for providing the newest build. It fixes indeed my problem and i cannot discover any other problems at the moment. Thank you again.

Kind regards,
Michiel Peeters
0
Ingimar Andresson
Top achievements
Rank 1
answered on 09 Jul 2010, 08:19 AM
Hello!

Hope it's okay to reply to an existing thread. I'm experiencing the same effect, the elements in panelbar are not responding to clicks.
I'm using Telerik.Web.Mvc 2010.1.518.235.

I am using jquery ui tabs that opens a page containing a panelbar on document ready.
The errors I receive are:
Chrome:
Uncaught TypeError: Cannot read property 'panelbar' of undefined
Uncaught TypeError: Object #<an Object> has no method 'tPanelBar'
Firefox:
a is undefined
 
Line 1
var a=c.telerik

c is a function but telerik is undefined.
I am including telerik.common and telerik panelbar in scriptregistrar on master.
0
Michiel Peeters
Top achievements
Rank 1
answered on 09 Jul 2010, 08:28 AM
If you make use also off the tabcontrol you need to include those as well. I have added the code snippits how i have created it in my project.

The first code snippit is the page where usercontrols are loaded in:

<%  
    Dim tabBuilder As Telerik.Web.Mvc.UI.TabStripBuilder = Html.Telerik().TabStrip()
    tabBuilder.ClientEvents(Function(clientEvent) clientEvent.OnSelect("onSelect"))

    tabBuilder.Name("TabsProjectTypes")

    For Each projectTypeEntity In Model.ProjectTypes
        tabBuilder.Items(Function(tab) tab.Add().Text(projectTypeEntity.Name).LoadContentFrom(projectTypeEntity.Name & "Versions", "ProjectType", New With {.id = projectTypeEntity.Id, .selectedVersionId = Html.Encode(ViewData("SelectedVersionId"))}))
    Next

    tabBuilder.SelectedIndex(Html.Encode(ViewData("ViewTemplate")))
    tabBuilder.Render()
%>

</asp:Content>

<asp:Content ID="DetailsProjectScriptContent" ContentPlaceHolderID="ScriptContent" runat="server">
    <%=Html.Telerik().ScriptRegistrar().DefaultGroup(Function(group) group.DefaultPath("~/Areas/ConceptManager/Scripts/") _
                                                                                        .Add("jquery-1.4.2.min.js") _
                                                                                        .Add("telerik.common.min.js") _
                                                                                        .Add("telerik.treeview.min.js") _
                                                                                        .Add("telerik.panelbar.min.js") _
                                                                                        .Add("telerik.calendar.min.js") _
                                                                                        .Add("telerik.datepicker.min.js") _
                                                                                        .Add("telerik.draganddrop.min.js") _
                                                                                        .Add("telerik.grid.filtering.min.js") _
                                                                                        .Add("telerik.grid.grouping.min.js") _
                                                                                        .Add("telerik.grid.min.js"))
    %>
</asp:Content>

The next code snippit shows the usercontrol where the panels are on located:
<%            
    Dim panelBuilder As Telerik.Web.Mvc.UI.PanelBarBuilder = Html.Telerik().PanelBar()
    
    panelBuilder.Name("DesignVersionsOverview")
    panelBuilder.ExpandMode(PanelBarExpandMode.Single)
    
    If String.IsNullOrEmpty(Html.Encode(ViewData("SelectedVersionId"))) Then
        panelBuilder.SelectedIndex(0)
    End If

    For i As Integer = 0 To Model.Versions.Count - 1
        panelBuilder.Items(Function(item) item.Add().Text( _
                               String.Format("{0}.{1}", Model.Versions(i).MainNumber, Model.Versions(i).SubNumber & _
                                             "<span style=""margin: 2px 20px 0px 30px; position: absolute;"">" & _
                                             If(Model.Versions(i).IsActive, "<img src=""http://website/versie_2_2/lib/images/icon_active.gif"" alt=""Actief"" title=""Actief"" onclick=""window.location = '" & Url.Action("ToggleVersion", "Version", New With {.id = Model.Versions(i).Id}) & "'"" />", "<img src=""http://website/versie_2_2/lib/images/icon_inactive.gif"" alt=""Niet Actief"" title=""Niet Actief"" onclick=""window.location = '" & Url.Action("ToggleVersion", "Version", New With {.id = Model.Versions(i).Id, .projectId = Html.Encode(ViewData("ProjectId")), .projectTypeId = Html.Encode(ViewData("ProjectTypeId")), .viewTemplate = Html.Encode(ViewData("ViewTemplate"))}) & "'"" />") & _
                                             "<img style=""margin-left: 5px;"" src=""http://website/versie_2_2/lib/images/icon_edit.gif"" alt=""Bewerken"" title=""Bewerken"" onclick=""window.location = '" & Url.Action("UpdateVersion", "Version", New With {.id = Model.Versions(i).Id}) & "'"" />" & _
                                             "<img style=""margin-left: 5px;"" src=""http://website/versie_2_2/lib/images/icon_add.gif"" alt=""Versieonderdeel Toevoegen"" title=""Versieonderdeel Toevoegen"" onclick=""window.location = '" & Url.Action("InsertDesignVersionPart", "VersionPart", New With {.id = Model.Versions(i).Id}) & "'"" />" & _
                                             "<img style=""margin-left: 5px;"" src=""http://website/versie_2_2/lib/images/icon_delete.gif"" alt=""Bewerken"" title=""Verwijderen"" onclick=""window.location = '" & Url.Action("DeleteVersion", "Version", New With {.id = Model.Versions(i).Id}) & "'"" /></span>")) _
                                             .Encoded(False).LoadContentFrom("DesignVersionParts", "Version", New With {.id = Model.Versions(i).Id}))

        If Not String.IsNullOrEmpty(Html.Encode(ViewData("SelectedVersionId"))) Then
            If Model.Versions(i).Id = Html.Encode(ViewData("SelectedVersionId")) Then
                panelBuilder.SelectedIndex(i)
            End If
        End If
    Next

    panelBuilder.Render()
%>

When you follow like this it should work then. Otherwise check if you have included all the files seperately (like in the first code snippit).
Tags
General Discussions
Asked by
Michiel Peeters
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Michiel Peeters
Top achievements
Rank 1
Ingimar Andresson
Top achievements
Rank 1
Share this question
or