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

back button on the tool bar

1 Answer 39 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Rishi
Top achievements
Rank 1
Rishi asked on 09 Mar 2010, 09:16 PM
Hi

Can anyone throw some light on the following:

I need to add a tool bar that is visible across all the pages in the web site .. so I created a user control(.ascx file) with only a rad toolbar and all its items and added to the master page.

Questions:

1. Is there a way to enable and disable the items in the tool bar depending on some settings or values on the content pages.
2. I have items like print,save,back etc can I have client side java script functions do the handling for me? right now this is how i am doing it:

protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
        {
            if (e.Item.Value == "Back")
            {
                Response.Write("<script type='text/javascript'>history.go(-1);</script>");  -- This isn't working though
            }

            if (e.Item.Value == "Print")
            {
                Response.Write("<script type='text/javascript'>window.print();</script>");
                
            }

        }
I appreciate any help.

Thanks

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 11 Mar 2010, 03:43 PM
Hi harisha yalamanchili,

Regarding the first question, please check this forum post.

I suggest you use OnClientButtonClicked event of RadToolBar to execute the javascript code.

Greetings,
Yana
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.
Tags
ToolBar
Asked by
Rishi
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or