Hi
I am trying to use the Webdropdown (DD) cascading feature, but the client side code does not seem to be working correctly. I am wanting to change data in DD1 which then updates data in DD2. I followed the exact outline as shown on the online documentation. Here is what happens:
The javascript function is being hit by the client side event "selectionChanged" of DD1. I have tested it with the following code:
function portalChanged(sender, e) {
//Gets reference to the productDropDown
alert("Reached 1")
var DD2Temp= $find("DD2");
alert("Reached 2")
alert(e.getNewSelection()[0].get_value())
DD2Temp.loadItems(e.getNewSelection()[0].get_value());
alert("done")
}
Basically Alert 1, Alert 2 and Alert 3 fire correctly when I make a selectionChange on DD1. It seems to HANG when it tries to call the "loaditems" method.
To go even further I have loaded all the JS files that ship in the ASPNET_AJAX folder into the page directly to see if I am missing anything. Still not working.
Any ideas?
Regards
Andrew
Hi Andrew,
That's quite strange - is an AJAX request executed when loadItems is called for the second dropdown ?
Thanks,
Angel
Hi Angel
Forgive my ignorance I am a little new to this. How do I tell if an AJAX request is executed?
when loadItems is called, and performs a postback, it would hit the ItemsRequested server-side event. That's the place where items should be populated for the second dropdown on the server-side.
So you can either just put a breakpoint in page_load, or in your ItemsRequested event handler for the second dropdown (in code behind). It should work.
Let me know if that helps - i can send a sample application as well.
ANgel
I was reading your documentation specifically on CSOM. From what I gather this is a series of javascript files that get loaded into the browser for each of the ASP.NET AJAX controls. These controls then use this CSOM to do all their client side stuff. What I dont understand is when I go into the ig_webdropdown.js file that comes with Infragistics I cannot find any of the functions or properties as mentioned on the documentation. For example in the online documentation it says that one of the methods of the Webdropdown class is loadItems:
function loadItems() : (Any);
var resultVar = instanceOfWebDropDown.loadItems();
Yet when I go to the ig_webdropdown.js file that method
does not exist in the file.
How does this work?
Am I bringing in the correct .js files?
Many Regards
Hey Andrew,
Thanks a lot for your feedback. I will investigate these scenarios in the context of DotNetNuke and provide you with help as soon as I can - most probably sometime next week.
Do you use any other IG controls in DotNetNuke?
About your second question about the CSOM API - the signature of the function is:
loadItems: function(text) {
///.....
If you look for "loadItems" only, or "loadItems:" I guess you should find the code. The argument it accepts is the text to filter by. I will check with our Docs to see if anything should be modified in the docs about this.
Will keep you updated. Best,
I'm attaching a tutorial about how to add Infragistics controls to DotNetNuke. Hope it's useful to you.
Not sure if this helps but I tried out the new WebHierarchicalDataGrid with a WebHierarchicalDataSource where the child bands are loaded only when the parent band is selected. This works fine. The child band data is fetched with no page postback taking place. AJAX seems to work fine in this scenario. Maybe there is something specific about the WebDropDown control that is causing the issue.
Ok i will investigate this. Thanks again for your feedback,
When you say get the contents for the controls DropDown javascript I assume you mean load up a page where the feature is working and then view the source of the page. Scroll thorugh all the javascript files in that page until I find the one with the LoadItems function in it. Copy that data and create a new .js file with the copied data. Inject this new file into the page?
If this is the case, I have done it but the client side call still hangs.
Thanks
loadItems is present from the first volume release the control was introduced - 9.1.1015. The problem is with the actual installation scripts. There is another file igDropDown.js , which is for a general javascript drop down behavior (just opening a dropdown container from a target element). This is like framework stuff, but because the files are with the same names, the actual control javascript got overwritten by the other one. I will follow up with our Installation team and let you know when we fix this. In the meantime you can get the contents for the control's DropDown javascript, and create another file in that folder, with a different name. I suppose it should work.