Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Wednesday, March 28, 2012

UpdatePanel - Javascript to create control wont fire

I've got an update panel that functions like tabs, hiding/showing certain controls. One of the controls is rendered via javascript:

<script type="text/javascript" language="JavaScript">
showCategoryBox("Databases", "All Resources");
</script>

This creates a dropdown list to choose from. It works fine when the page loads, but going to other tabs, then coming back to this one causes it to disappear. All of the standard html controls show up fine, but it won't execute this script to create the dropdown.

Any Ideas? Thanks

Coop

Try something like this. The pageLoaded event of the PageRequestManager is raised after every postback, synchronous or asynchronous.

<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(onPageLoaded);

function onPageLoaded(sender, args) {
showCategoryBox("Databases", "All Resources");
}
</script>


Thanks. I tried this (and something very similar by using ScriptManager in the cs file) and it just basically only shows this drop down, nothing else on the page shows up. The page starts to render, then everything goes blank and only this shows up at the top.

Monday, March 26, 2012

UpdatePanel + Infragistics Treeview

I am trying to create a very simple UpdatePanel + Treeview page. The data is initally loaded (via code, recursive nodes added in code behind) the tree loads fine.

As soon as I click on a node (and capture the NodeClick event) the Tree view stops working and reports a Javascript error. "Microsoft JScript runtime error: 'undefined' is null or not an object"

Has anyone seen this before? Do the Infragistic controls not work with Atlas?

Thanks in advance.

Are you using the Tree's Automatic SmartCallback LoadOnDemand behavior, or Manual LoadOnDemand? I would recommend using the Tree's own AJAX enabled LoadOnDemand functionality, even inside of the UpdatePanel, since you really only need to update the tree. If you still have difficulty, please contact Infragistics Developer Support (http://devcenter.infragistics.com)

Also, if you have a valid Subscription, we are about to release our 2006 Volume 2 Beta. We've made some changes in order to better support Atlas, and it would be great if you could validate whether it fixes your current problems or not.

-Tony

Anthony Lombardo
Infragistics, Inc.
Product Manager | NetAdvantageASP.NET