hello guys.
well, to me this is not a problem of atlas...it's a problem on the way asp.net renders its controls. to me, they should allways have an id applied to them. as you have noticed, the control doesn't generate an id when you perform its initial rendering. to me, this is a bug! in fact, if you check the source of the page during the editing phase, you'll see that it's there!
regarding the problem you've mentioned, it's realted with the way the atlas client platform works. you see, atlas hsa to ensure that it handles all the postbacks (partial and complete). normally, when you add the id to the control, it'll generate a request and it'll identify the scriptmanager control as the responsible for the request. as a consequence, you'll have a partial postback instead of a full postback. you can check this by seeing the __doPostBack method of the pagerequestmanager client class.here's an excerpt of the place where the problem occurs:
_postbackSettings = null;
var postbackElement = findNearestElement(eventTarget);
if (postbackElement) {
_postbackSettings = getPostbackSettings(postbackElement);
}
else {
_postbackSettings = createPostbackSettings(true, _scriptManagerID);
}
if (!_postbackSettings.async) {
_originalDoPostBack(eventTarget, eventArgument);
return;
}
if you look at the edit buttons, they'll allways indicate the id of the grid; unfortunatelly, the asp.net engine isn't rendering the id on the 1st request and due to this, findNearestElement returns null. so, you'll have the wrong postback settings and this will result in the object expected error you've mentioned (btw, this happens because the scriptmanager class sees there's a delta header on the request -added by the pagerequestmanager class, since it has started a partial postback, instead of a full postback - and hooks up the rendering of the page; during that phase, it tries to go through all the updatepanels by using the _updatePanels field; unfortunatelly, in this example the field is null and you get the exception).
btw, i think this thread deserves a new one with the word BUG on its title pointing to here so that this behavior gets fixed.