Skip to main content
Home Forums Silverlight Programming Programming with .NET - General All data is valid then save
1 replies. Latest Post by SLMonster on July 5, 2009.
(0)
Agnushal...
Member
54 points
140 Posts
07-05-2009 2:26 PM |
I have a BindingValidationError in my layoutroot grid and the validation code is in a property. Everething is working. But I have to click in a button to save data in de databank. But I want to save the data if all data in the all controls is valid.
How I make this in the click of a button using SL2??
SLMonster
299 points
65 Posts
07-05-2009 11:44 PM |
Write a method that checks and return boolean after validating all the controls on page. call this method on button click e.g. Save button. if the validate method returns true the proceed. If it returns false, Show the message to user and quit from the Save button click event handler.
--cheers, Mahesh