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

[Solved] Corrupted draws on ajax

2 Answers 119 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 2
Nick asked on 27 Feb 2009, 03:01 PM
Posting this in case anyone else runs into the problem.

We have a Panel Bar control that uses AjaxManager to update.   The bar is dynamic and created on the fly based upon a tab control.   When opening a panel, a user control is loaded, also created dynamically.

The code to handle this is a bit complex - we found that peroidically the slider and/or treeview controls would corrupt when they drew.   If it happened ALL controls of that type would stay corrupted until the screen was forced to reload.

It's erratic when it does it and we have no way to duplicate it on a consistent basis.  What occured to us was that it seemed to be some sort of cache causing the problem since every control would draw bad even though everytime you opened a different panel the user control was being reloaded and the previous one was being destroyed (Only one panel can be opened at a time).  We tried monitoring the DOM coming in but nothing ever seemed to be different when it did fail.

Our fix: we place an empty panelbar and a one item tree view into a hidden div at the top of the page OUTSIDE of the Ajax calls - basically force Telerik to immediately load the support code for the controls.   We were having the problem 3 or 4 time a day and it now hasn't happened in four days.

Obviously it has something to do with the way the javascript is rendering from the update panel.   I would prefer to submit a ticket but there is no way to build a 'simple' web application that can recreate the problem.   I don't think it even IS a telerik problem.  I think it goes deeper into Ajax when complicated updates are performed.  The slider and tree view are pretty complicated JS - none of the other controls we are using ever exhibited the problem.  In any case, I'm not an Ajax expert so I may be completely off.  I just know this fixed it and that points a finger at the Ajax updates IMHO.

Anyway, hopefully this work around helps someone. 

Regards,
Nick H

2 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 03 Mar 2009, 11:24 AM
Hello Nick,

Thank you for sharing your solution in our public forums. Thus other community members who stumble upon the same oddity can use the workaround you described. I updated your Telerik points for the involvement.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mark Blom
Top achievements
Rank 1
answered on 25 May 2009, 06:52 AM
Hello Nick,

Every now and then, people in my company complain about errors in the website. In such cases the yelow Javascript traingle is shown in IE's status bar.

Clearing the temporary internet files or reloading the page then makes it work again.

This has bothered me a lot as I was not able to reproduce or find the source of these errors.

This website uses the panelbar on almost every page and the treeview on many pages as well (masterpages and content pages).

I will try your suggestion by putting an empty panel bar and a simple treeview within the masterpage.

Hopefully this will solve this strange error!

@Telerik:
Please let me know if an other, perhaps cleaner, solution is available!

Best regards,

Mark
Tags
Ajax
Asked by
Nick
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Mark Blom
Top achievements
Rank 1
Share this question
or