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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.