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

Toolbar suddenly stopped working

11 Answers 168 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
terrysmith
Top achievements
Rank 1
terrysmith asked on 03 Jun 2008, 04:59 PM
I have a very, very weird problem. The RadToolbar has suddenly stopped working today on both my development machine and a testing server. Neither the OnClientButtonClicking javascript event nor the ButtonClick event is being fired for any of the toolbar buttons. I have not put new code on the testing server since last Friday, and it was working yesterday.

I know it's a long-shot than anyone else has experienced this, but am I alone? Has a recent Windows Update changed the behavior in any way?


11 Answers, 1 is accepted

Sort by
0
terrysmith
Top achievements
Rank 1
answered on 03 Jun 2008, 09:09 PM
Last Friday I was able to finally remove all the Classic RadControls from our app: all of the binaries, scripts, and skins. Apparently the problem we're having must have been introduced then, but we are only finding it now. That is the only explanation I know of. As far as I can see all of the old references and Imports statements have been removed.
0
Erjan Gavalji
Telerik team
answered on 04 Jun 2008, 06:44 AM
Hi Terry,

We haven't come across any problems with the latest Windows updates. Does the browser report any JavaScript errors? Can you send us a live URL where we can observe the erroneous behavior?

Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
terrysmith
Top achievements
Rank 1
answered on 04 Jun 2008, 04:15 PM
Thanks, but sending you a live URL is not possible. This is an intranet banking application.

I've found that the OnClientButtonClicking javascript function is not rendered anywhere into the HTML for the page. The Telerik javascript for defining the client-side callback is not there.

All of the toolbar buttons are constructed and added to the toolbar in code because of complex requirements. Here's the code I'm using for the example above:

Dim btnNew As New RadToolBarButton 
btnNew.Value = "new" 
btnNew.ToolTip = "New" 
btnNew.ImageUrl = Me.ResolveClientUrl("./Images/NewDocument.gif"
toolbar.Items.Add(btnNew) 

I've added a testing toolbar below the other one and statically defined the New Document button in it's Items collection. It works fine. Both the client-side and server-side events get fired, and the Telerik javascript for adding the OnClientButtonClicking  event gets added to the page.

I must be missing something in the server code for building the toolbar.

Any ideas?

Thanks,
Terry


0
Erjan Gavalji
Telerik team
answered on 05 Jun 2008, 12:34 PM
Hi Terry,

Please, find attached a small page, demonstrating the definition of a client-side event handler to the RadToolBar's OnClientButtonClicking event from the server. I complicated the example to use Ajax, as I am not sure on the exact scenario you have.

Let me know if that helped.

Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Keith Henkel
Top achievements
Rank 1
answered on 05 Jun 2008, 10:45 PM
Thanks, I'm still looking into the problem.
0
terrysmith
Top achievements
Rank 1
answered on 06 Jun 2008, 09:58 PM
Besides all the other hours I've put in on this, I've spent all day today looking at just this problem, and I still can't get the toolbar to work.

Let me show a simplified example first. This is on one of our pages where there are only two toolbar buttons and both are statically defined. The code looks like this:

<telerik:RadToolBar ID="toolbar" style="display:block; float: none" Width="100%" runat="server"
    <Items> 
        <telerik:RadToolBarButton Value="newreport" Text="New Report" PostBack="false" NavigateUrl="~/InsightExplorer/InteractiveReporting.aspx?Mode=" ImageUrl="Images/NewDocument.gif" CssClass="toolbarlink" runat="server" /> 
        <telerik:RadToolBarButton Value="newfolder" Text="New Folder" PostBack="false" NavigateUrl="~/InsightExplorer/InteractiveReporting.aspx?Mode=NewFolder" ImageUrl="~/Images/Reports/NewFolder.gif" CssClass="toolbarlink" runat="server" /> 
    </Items> 
</telerik:RadToolBar> 

The Text hyperlinks work, but the toolbar icons will not work. Clicking on them will not fire the link. In this example I'm not even trying to catch the client or server-side events. Here is the HTML that gets rendered for one of the buttons:

<li class="rtbItem rtbBtn"
    <class="toolbarlink rtbWrap" href="InteractiveReporting.aspx?Mode="
        <span class="rtbOut"
        <span class="rtbMid"
        <span class="rtbIn"
        <img alt="" src="Images/NewDocument.gif" class="rtbIcon" /> 
        <span class="rtbText">New Insight Report</span> 
        </span> 
        </span> 
        </span> 
    </a> 
</li> 

On my other page the toolbar buttons don't have Text links. If I add them in just to see what happens, nothing changes. Neither the label or icon will work because the onToolbarClientButtonClicking function is still not getting added to the page.

I know you need a sample add to do much with it. I'll have to try that next I guess. All of these cases by the way are within an asp:UpdatePanel where buttons within the panel repost the update panel. We never use Triggers clauses because we've never found them necessary.

Thanks again,
Terry

0
Erjan Gavalji
Telerik team
answered on 09 Jun 2008, 03:18 PM
Hi Terry,

Indeed, we identified a bug with the toolbar button image navigation in IE. Please, excuse me for not understanding the problem earlier.

We are working on fixing this right now. Please, open a formal support ticket to obtain the internal fix once ready.

Kind regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
terrysmith
Top achievements
Rank 1
answered on 09 Jun 2008, 03:39 PM
Thank you, I will do that.

However, I think that may fix only part of my problem. I still have a screen where I can add Text links for the toolbar buttons and they still do not work even on the text link part.

0
Erjan Gavalji
Telerik team
answered on 09 Jun 2008, 04:34 PM
Hi Terry,

We will send you the fix once ready (hopefully tomorrow). Regarding the other problem you're experiencing - well, I'm waiting for your example.

Regards,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
terrysmith
Top achievements
Rank 1
answered on 10 Jun 2008, 07:26 PM
Hi Erjan,

I finally narrowed down the problem to something related with the ouput caching of our main menu. I can delete the OutputCache directive on our menu control and the toolbar will work. If I put it back it will stop working again.

I've submitted support ticket 143328 with a sample app for this issue.


Thank you,
Terry

0
Veselin Vasilev
Telerik team
answered on 11 Jun 2008, 09:22 AM
Hello terrysmith,

Thank you for the provided project. It really helped us to find the problem.

You need to set the LoadScriptsBeforeUI property of the RadScriptManager to True (in your master page file). Otherwise the toolbar is not well initialized.

I hope this helps.

All the best,
Veskoni
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolBar
Asked by
terrysmith
Top achievements
Rank 1
Answers by
terrysmith
Top achievements
Rank 1
Erjan Gavalji
Telerik team
Keith Henkel
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or