Sorry for the wordy title, but it seemed the best way to describe the issue.
Basically, we have a WebDropDown inside an update panel, whose current value we want to change depending on what WebTab is loaded. We've tried handling the WebTab SelectedIndexChanged event to modify this value, but the update panel doesn't get an Async postback triggered. This is after adding the WebTab as an async postback trigger inside the UpdatePanel too.
I finally got it to work by calling __doPostBack via clicking a button on the ClientEvents-SelectedIndexChanged event, but now I'm presented with this error everytime I change a tab:
Error: Sys.ArgumentUndefinedException: Value cannot be undefined.Parameter name: type
Any ideas as to what is causing this issue?
Hi again,
Thanks for the example file.
I am glad that you've managed to resolve this issue.
Thank you for using our controls.
Ended up having a fiddle around and got it to work how I wanted (looks like it was a combination of incorrect properties and controls, but what they were I'm not too sure!). The posts here regarding updating a webdropdown from a webtab helped immensely however!
Hello Alex,
Thank you for the detailed replies. About your question related to newly added WebDataGrid, it should not be related to the mentioned issue, especially if it is empty and haven't set anything to it. Can I ask you, do you use any 3rd party software components like Ajax Control Toolkit? Sometimes this is messing up with our controls and cause issues similar to this one.
There are some existing methods that can overcome this issue, like:
- Set debug=false in web.config (http://bjornstad.ws/2010/10/sys-argumentundefinedexception-value-cannot-be-undefined/)
- Avoid using Clear() function, this is related mostly for WebHierarchicalDataGrid and cannot be related to your issue (http://codecorner.galanter.net/category/javascript/page/4/)
- Check your ScriptManager/WebScriptManager definition (http://stackoverflow.com/questions/14793415/ajax-toolkit-not-working)
- Clear your browser cache
Looking forward to hearing from you.
Just to add further to this, I've noticed that the WebDataGrid is always null when I'm debugging. For instance, in the Page_Load event, the WebDataGrid is null.
EDIT: Looks like the WebDataGrid only loads if it is in the initial selected tab. Any other tabs with a webdatagrid that aren't selected on start up don't seem to get instantiated (using the above WebTab properties). Is the proper behaviour? If it is, is there a way I can force them to be loaded so that I can keep in place the WebTab options we have?