The page is loaded correctly at first but during postbacks in many cases it ends up with error saying that some of DropDowns has a SelectedValue which is invalid because it does not exist in the list of items. In this post I have described the same problem and the solution was to specify the TopMostItem. However - all of dropdowns has the TopMostItem set up!
The page works correctly when I remove these 3 dropdowns. I'm really confused by this behavior and cannot find the cause of this error.
I can email You my project (I cannot post it to whole forum) if necessary.
Regarding to Your findings:
However the problem still persist: Your corrected application works fine because You call Add methods for BO's in page_load. But I do not want to have all objects in editing state. I want to allow user to change editing status on the page. When You remove these methods from page_load, the page is loaded correctly but when You press the button, the error is produced - and this is exactly what I'm fighting with.
For better understanding of my problem I give here a real world example: There is a page in the application that contains employee details. Except details of the currenty employee I need to have list of his children, previous jobs, trainings passed etc. For all of these BO's I need to allow user to see list of records and allow him to add/edit children, trainings ect. on the workers page. So at this moment I cannot set all of these BO's to editing state in page load but at the moment when user clicks the "Add child", "Edit training" etc...
Thank You
I really don't know what else to say via the forum past taking the sample that you gave me and trying to point you in the right direction here. This has more to do with how you dsign your application versus being anything related to StrataFrame.
You must take business logic and design into account here which includes the possibility that you do not have records in one BO while they are in the other. Now, SF will take a no record situation into account automatically as the bindings get removed in this case to prevent an error. But from what I can tell, and from the sample that you provided for me to look at, I don't see anything that is SF related. You would have the exact same issue if you were using data adapters and standard .NET data binding. I don't of any other way to say this or explain this.
To really help you understand the overall issues that you have within your application are more of a consulting and training issue versus any type of issue with StrataFrame. The forum is not a good tool for this and is why we provide training classes and the occasional consulting (when we have the time). But past creating some sample that more accuratly depicts your problem, I am at a loss as to what to add to my comments here. Sorry