I have this code from Rolodex example
<Button x:Name="saveBtn" Content="Save" Width="50" Margin="0,2"
csla:InvokeMethod.MethodName="Save"
csla:InvokeMethod.Resource="{StaticResource LicensorData}"
csla:InvokeMethod.TriggerEvent="Click"
IsEnabled="{Binding Path=CanSave, Mode=OneWay}" />
<Button x:Name="cancelBtn" Content="Cancel" Width="50" Margin="0,2"
csla:InvokeMethod.MethodName="Cancel"
csla:InvokeMethod.Resource="{StaticResource LicensorData}"
csla:InvokeMethod.TriggerEvent="Click"
IsEnabled="{Binding Path=CanCancel, Mode=OneWay}" />
<Button x:Name="deleteBtn" Content="Delete" Width="50" Margin="0,2"
csla:InvokeMethod.MethodName="Delete"
csla:InvokeMethod.Resource="{StaticResource LicensorData}"
csla:InvokeMethod.TriggerEvent="Click"
IsEnabled="{Binding Path=CanDelete, Mode=OneWay}" />
The problem is that after I clicked Delete button and then click Save, the CSLA dataprovider is not setting the Save button to disabled(the CanSave property dose not set to false after you click Delete and Save). So Then user is confused and they can click the Save button again, then the save button get disabled. However, what happen to the real data is that the recode first get deleted from the Database and then it gets added as a new recode.
This behavior is also in the Rolodex example. I may be a bug in the CLSA, Any ideas?
Thanks
Here is a question, just to clarify. Once the user deleted
and saved the deletion, should the screen really display something other than
the deleted record? Maybe it should close to allow the user to select
something else from a list of items?
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: rogercito
[mailto:cslanet@lhotka.net]
Sent: Friday, February 06, 2009 3:11 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] Silverlight Save button is not disabled after
delete save
I'm also having the same problem, in a toolbar.
Well. I have a Close button for users to close out at any moment they want to.
You suggestion to me is more like a good work around. Anyway, for now if there is no way to solve this problme I may just have to make a work around for it as you suggested.
Thanks,
Well, if just for saving, It works great. I don't see any problem with it. You might need to revisit your code then.
I really hope they can fix the Deletion on the next release.
Copyright (c) Marimer LLC