By Michel Levy - 12/24/2010
Hi,
On editing from the form, I get a message "There are no rows in the current data table. An edit is not allowed." It is a SF message, not of mine.
(There are no rows in the current data table. An edit is not allowed. à MicroFour.StrataFrame.Business.BusinessLayer.Edit(Boolean CheckSecurity) à MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Edit(Boolean CheckSecurity) à MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdEdit_Click(Object sender, EventArgs e) ...)
After validating the message, I can edit and save.
On a maintenance form, I've 3 BO. The IncludeInFormEditType property is set to DeterminedByBusinessObject. The Primary BO is set on IncludeInFormEdit = True, the 2 other one are set to False. Only the primary BO is set to ManageUIReadOnlyState = True. One of these BO is a child of the primary BO (ChildAutoFilter is set to MatchCurrentRow). There is a ChildFormDialog on this form, with BO translations for the primary and its child. The only BO with no row is neither the primary, neither its child (the third one...)
The code for the EditingStateChanged for the form is in a Try/Catch, and the catch is never raised. Same thing with a try/catch on EditingStateChanged of each BO.
What could be the origin of this message? How could I trap it?
|
By Ivan George Borges - 12/24/2010
Have you tried debugging and steping into SF source code to determine where you get the exception?
|
By Michel Levy - 12/24/2010
Hi Ivan,
no, not yet. Do you think that's the only way to determine where this exception comes from?
I didn't want to debug SF source code but everything needs a first time... I'll build the SF project source in debug mode and go on.
Arghh! SF source code is in VS2010, and this project is on VS2008. Do you think I need to upgrade my project in VS20010, for debugging in SF source code?
|
By Ivan George Borges - 12/24/2010
Hi Michel.
Probably this is not the only way, but it is one that will surely show you where the issue is.
For the VS 2010 thing, I wouldn't think it would be a problem, as long as you are using VS 2010, I guess.
Merry Christmas!
|
By Michel Levy - 12/25/2010
Thanks Ivan
I preffered to find a workaround, because I was unsure of the debugging between VS2008 and VS2010.
Begining the Edit process, I save an empty snapshot of the empty BO, add a "dummy" new row, and at the end of the saving process of an edit, I restore the empty snapshot. Yes, I know, it's not very pretty ... but it works.
Before going deeper in SF code, I want to verify the problem on a more simple form, without all this confuse code I wrote.
Thanks again, and merry Christmas
|
By Ivan George Borges - 12/26/2010
Good to know that, Michel.
Yep, I do that all the time and then I try to break up the logic into small pieces and go 1 by 1 untill I can isolate where the issue is.
|
|