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

Back Button Working Only One Time

3 Answers 49 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Digant
Top achievements
Rank 1
Digant asked on 12 Feb 2014, 02:25 PM
Hello Friends,

In File Explorer control Grid i go from main directory to sub directory from there i go another directory of sub directory
Like Main directory => Sub Directory => another directory of Sub Directory

When i press back button it go back to Sub Directory
Now i press back button second time it not go back to main directory it remain on same directory


///////////code.cs/////////


        FileExpDocument.ToolBar.Items[0].Visible = true;
        FileExpDocument.ToolBar.Items[1].Visible = false;
        FileExpDocument.ToolBar.Items[2].Visible = false;
        FileExpDocument.ToolBar.Items[9].Visible = false;
        FileExpDocument.ToolBar.Items[6].Visible = false;

       FileExpDocument.ToolBar.OnClientButtonClicked = "OnClientButtonClieck";


///////end///////////////

Here is only Toolbar control related code
in this "OnClientButtonClieck" just set the height of grid and div

when i click first time back button the page_init and Page_load all event fire
But when i click second time no event fire nothing happen


Please help me it is very urgent 

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 17 Feb 2014, 12:21 PM
Hi Digant,

Most probably the issue is cause by the fact the provided code is executed on every PostBack. Wrapping the code in the following if statement fixed the issue on my side:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        FileExpDocument.ToolBar.Items[0].Visible = true;
        FileExpDocument.ToolBar.Items[1].Visible = false;
        FileExpDocument.ToolBar.Items[2].Visible = false;
        FileExpDocument.ToolBar.Items[9].Visible = false;
        FileExpDocument.ToolBar.Items[6].Visible = false;
        FileExpDocument.ToolBar.OnClientButtonClicked = "OnClientButtonClieck";
    }
}

Please, give it a try and let me know how it goes.

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.

0
Digant
Top achievements
Rank 1
answered on 18 Feb 2014, 01:54 PM
Thanks for reply

I have already applied in
!PostBack
same issue occur

for more detail i have attached one image

setTimeout function is called  from java scriptResource.axd when i press back button second time



0
Vessy
Telerik team
answered on 21 Feb 2014, 09:48 AM
Hi Digant,

I am not able to reproduce the experienced behavior on my side, so I assume there are any custom configurations on your project that are breaking the control functionality. Attached you can see the video from my test. Can you take a look at it and let me know whether I am leaving anything out?

In order to be able to provide any further assistance we will need to reproduce and examine the issue locally. Could you, please, prepare a sample fully runnable project reproducing the problem and send it for a further investigation? Detailed information on how to isolate such is available here: Isolating a problem in a sample project

Regards,
Veselina Raykova
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
FileExplorer
Asked by
Digant
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Digant
Top achievements
Rank 1
Share this question
or