tags:

views:

13

answers:

1

Is there an easy way in the xaml for a form (e.g. like a xaml attribute that I can place on a DataGridTextColumn) to force a datagrid cell to be numeric only?

A: 

Okay, figured this out:

It's just a matter of binding the row/cell to an 'int' property in my view model (I'm following the MVVM pattern). When I bind it to the int property, the cell will highlight indicating an error of something other than a numeric value is entered in. Very cool, that was easy!

Yes, i'm so a newbie to Wpf.

BrianP