I had some code that was working until the latest release of 2011.2.712.40. From RadGrid's OnMasterTableViewCreated:
Looked like this:
BUT tabStrip.get_multiPage() was null!! If I did NOT call this code, it was NOT null a second later, but if I DID call it, it would be stuck as null. Seems like the JS objects weren't loading as [I] expected. Perhaps the order of events changed somwhere?
This is my fix, using setTimeout:
<ClientEvents OnMasterTableViewCreated="DoStuff" />
Looked like this:
function DoStuff(sender, args) { var tabStrip = $find("<%= MainTabStrip.ClientID %>"); var pageViewID = tabStrip.get_multiPage().get_selectedPageView()._id; ... } BUT tabStrip.get_multiPage() was null!! If I did NOT call this code, it was NOT null a second later, but if I DID call it, it would be stuck as null. Seems like the JS objects weren't loading as [I] expected. Perhaps the order of events changed somwhere?
This is my fix, using setTimeout:
function DoStuff(sender, args) { setTimeout(function() { var tabStrip = $find("<%= MainTabStrip.ClientID %>"); var pageViewID = tabStrip.get_multiPage().get_selectedPageView()._id; }, 0); ... }