July 2009 Blog Posts

DomainDataSource.DataView

There have been a couple of discussions on the .NET RIA Services Forums regarding the DomainDataSource.DataView property.  Colin Blair tossed in a comment that relates to something we’re working on: This looks like as good a place as any to say I would like to see the actual object behind IEditableCollectionView exposed publically. … Right now, the DomainDataSource’s Data and DataView properties are returned as interfaces: Data is an IEnumerable, and DataView is an ICollectionView.  But behind the scenes, both of these properties return an instance of an EntityCollectionView,...

posted @ Tuesday, July 21, 2009 5:41 PM | Feedback (3)

DomainDataSource – Defining Its Limits

With the .NET RIA Services July 2009 Preview, the DomainDataSource now enables some scenarios that were previously blocked.  Most namely, we now allow you to change your current page while there are pending changes in the data.  Editing and paging seemed like a common enough scenario that we wanted to enable it, so we’ve done so in the recent drop. There are actually many scenarios opened up right now that we’re reviewing.  I’ll be frank: many of the following scenarios are probably doing really wonky things in the current bits.  So here’s your chance to help us determine how these scenarios...

posted @ Tuesday, July 14, 2009 3:45 AM | Feedback (15)

Async Validation with .NET RIA Services and DataForm

Please note… this post is out-dated and all of the madness below is no longer needed in order to implement Async Validation with RIA Services.  Please see the new post for the current approach. The Birth of QuickSilverlight.Validation Over on the .NET RIA Services forums, “SilverlightRIA” asked about performing asynchronous validation with .NET RIA Services and the Silverlight Toolkit’s DataForm.  He wanted to intercept the Commit from the DataForm and invoke his async validation, integrating the results into the DataForm’s validation UI.  This was an interesting scenario so I put some time into a solution for it this week.  The result is...

posted @ Saturday, July 11, 2009 5:05 AM | Feedback (9)

Validating Decimal Ranges with RangeAttribute

System.ComponentModel.DataAnnotations offers a RangeAttribute that can be used to validate that a value is within a given range.  Silverlight 3’s SDK includes this assembly and .NET RIA Services and ASP.NET Dynamic Data use this too. Something that a few of us have stumbled on here internally is that the RangeAttribute doesn’t have a constructor that takes Decimal values.  In fact, a bug was submitted by another feature crew for this.  Unfortunately, even if RangeAttribute offered a constructor that accepted decimals, you still wouldn’t be able to pass them in. Here’s what the code would look like: ...

posted @ Thursday, July 9, 2009 2:39 PM | Feedback (0)

Partial Guids as Random Passwords

Warning: this post is almost a complete waste of time. Read at your own risk. Years ago, my team was working on a feature that required random passwords to be generated, hundreds at a time. While discussing different techniques for doing this, one of the guys suggested just using a Guid, but only a substring of it. Brilliant! I've used that trick ever since then, every time I need to generate random passwords that need to be easily entered for 1-time use. I'm working on one of these features right now for an app I'm building....

posted @ Thursday, July 9, 2009 1:33 AM | Feedback (1)