This question is locked. New answers and comments are not allowed.
Hello,
After I add an entity and call Submit Changes on a domain context, the call to StartUpload on the RadUploader will not execute.
I have pasted some example code from what I am doing below. StartUpload is not executed and the completed event is never hit.
Is there something I should be doing that I'm missing? If I switch the order of things and have the radupload run before the submit changes, it works fine. But I have to submit changes first because in my custom rad upload handler, I add the files to a database and I need the new id of the entity submitted.
I am using the Silverlight 2010.2.812.1040 release, Visual Studio 2010, .Silverlight 4, Ria Services
After I add an entity and call Submit Changes on a domain context, the call to StartUpload on the RadUploader will not execute.
I have pasted some example code from what I am doing below. StartUpload is not executed and the completed event is never hit.
Is there something I should be doing that I'm missing? If I switch the order of things and have the radupload run before the submit changes, it works fine. But I have to submit changes first because in my custom rad upload handler, I add the files to a database and I need the new id of the entity submitted.
// add new entity to domain contextmyDomainContext.MyEntitySet.Add(myNewEntity);// call submit changes with call back methodmyDomainContext.SubmitChanges(submitOp_Completed, null);// submit changes call back methodvoid submitOp_Completed(SubmitOperation submitOp){ if (submitOp.HasError) { submitOp.MarkErrorAsHandled(); } if (this.taskerAttachment.CurrentSession.TotalFilesCount != 0) { myRadUploader.AdditionalPostFields.Add("newId", myNewEntity.id.ToString()); myRadUploader.UploadFinished += new EventHandler<EventArgs>(myRadUploader_UploadFinished); myRadUploader.StartUpload(); }}// raduploader completed methodvoid myRadUploader_UploadFinished(object sender, EventArgs e){ // do stuff}I am using the Silverlight 2010.2.812.1040 release, Visual Studio 2010, .Silverlight 4, Ria Services