more than dependent properties

more than dependent properties

Old forum URL: forums.lhotka.net/forums/t/5078.aspx


vijay posted on Thursday, July 10, 2008

In Validation rule I have three properties that are dependent and needs to be validated when any of the propert is changed. Seems AddDependantProperty can be used only with two properties. How can i extend it to use with three properties.

ValidationRules.AddDependantProperty(TimePropertyName1, PropertyName2, true);

Thanks.

sergeyb replied on Thursday, July 10, 2008

The simplest answer it to call it more than once.

ValidationRules.AddDependantProperty(TimePropertyName1, PropertyName2, true);

ValidationRules.AddDependantProperty(TimePropertyName1, PropertyName3, true);

ValidationRules.AddDependantProperty(TimePropertyName3, PropertyName2, true);

 

 

 

Sergey Barskiy

Senior Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: vijay [mailto:cslanet@lhotka.net]
Sent: Thursday, July 10, 2008 9:42 AM
To: Sergey Barskiy
Subject: [CSLA .NET] more than dependent properties

 

In Validation rule I have three properties that are dependent and needs to be validated when any of the propert is changed. Seems AddDependantProperty can be used only with two properties. How can i extend it to use with three properties.

ValidationRules.AddDependantProperty(TimePropertyName1, PropertyName2, true);

Thanks.



Copyright (c) Marimer LLC