views:

267

answers:

0

Maybe it's the 3 hours of sleep (thank you Harry Potter) talking this afternoon but I cannot wrap my head around this.

I'm trying to learn to use Expression Blend 3. And by learn, I mean do things in the "Blend way", using Behaviors and DataGrids and the new SampleData and all it's wonderfulness. I think it will be beneficial in the long run.

I have a set of data going into a DataGrid. I believe I can just change the type of DataGridTextColumn to a ValidatedDataGridTextColumn (in the Objects and Timeline window) and create that custom class. And I have some basic ideas on how to start a behavior. But I also know that DataGrid comes with RowValidation, but I have no idea how to use it.

For simplicity sake, let's say I want a certain column's length to not exceed 40 characters. So on every change I would want some event to fire on my ValidatedDataGridTextColumn. But what would that return and how does my behavior tell the DataGrid that the value is bad? Or do I even need to go this route?