Limit WPF DataGrid Cell's text length and spacing between columns

Feb 6, 2010 at 2:03 AM

I have a WPF DataGrid, using a DataTable to bind data to this DataGrid. First Column has range, if the range is two, user should be able to enter only two chanracters in the second column. How to limit the cell's max text length based on first column data.

When I bind data to WPF DataGrid, I don't see any space between column headers. How to give spacing between column headers so that it will be easy for the user to differentiate between two column headers.

Thanks in Advance.