I have my own button on the form that calls dataForm.ValidateItem(). It
works for Required and Range validators, but doesn't seem to fire the Custom
validators. ValidateItem() basically returns true and I end up with an
exception that shouldn't happen when I SubmitChanges(). Is this a known
issue?
Hi Miguel,
I ran the code:
var ctx = new ValidationContext(dfTermItem.CurrentItem, null, null) {
MemberName
= TermCategoryID };
var validationResults = new CollectionValidationResult();
//validate against a guid that should fail
if (Validator.TryValidateProperty(new
Are duplex wcf services not available in silverlight?
On Thu, 28 Jan 2010 08:59:33 +0530 wrote
gt;Hi All,
gt;I play around with real time updates to and from SL clients, and have
figured out a couple of possibilities with Silverlight.SocketsPolling over WCF
in SL2 or SL3 (HTTP)WCF net.tcp
Silly comment.nbsp; Of course not, as this would require tcp.
On Thu, 28 Jan 2010 10:08:32 +0530 wrote
gt; Are duplex wcf services not available in silverlight?
gt;
gt;On Thu, 28 Jan 2010 08:59:33 +0530 wrote
gt;gt;Hi All,
gt;gt;I play around with real time updates to and from SL clients, and
Peter,
We used sockets in Silverlight2 to prototype a spatial collaboration
concept. The main issues we faced were:
1. Needed to run a windows application (testing=console app,
production=windows service) for both server side processing and also as a
policy service. Made it hard to deploy.
I just reflected over the code and found that it was using some reflection to
retrieve the custom
attributes. So I added in this code to see if the attributes were, in fact,
visible.
foreach (PropertyInfo info in typeof(Term).GetProperties())
{
It's ok, I think I figured it out. The attribute is not available on the client
side. Within the generated
code for the class, it was missing the TermCustomValidation class and it has
the following
message. So now I just have to figure out why the class isn't coming across to
the client.
T.
Try deleting the contents of the Generated_Code folder (it's hidden, use
Show All Files to see it) - sometimes RIA Services stops updating the code
files, but deleting them will get it generating them properly again. Also
make sure that your custom validation code is in a .shared.cs file so it is
It was because I had forgotten to change the filename to have the .Shared.cs
extension. Then I
needed to do a clean and build again.
Thanks all for the help.
T.
On Thu, Jan 28th, 2010 at 5:06 PM, Chris Anderson christheco...@gmail.com
wrote:
Try deleting the contents of the Generated_Code