Skip to main content

Microsoft Silverlight

Answered Question All data is valid then saveRSS Feed

(0)

Agnushallard
Agnushal...

Member

Member

54 points

140 Posts

All data is valid then save

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??

Using

Visual Studio 2008
Silverlight 3
WCF
MySQL

SLMonster
SLMonster

Member

Member

299 points

65 Posts

Answered Question

Re: All data is valid then save

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

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities