<p>Is there a simple way to format numbers in a Winforms 1.1 datagrid?  The Format property of the DataGridTextBoxColumn seems to be completely ignored.  I know there is a <a href="http://support.microsoft.com/kb/318581" rel="nofollow noreferrer">solution</a> that involves subclassing a Column control, and it's fairly simple, but was hoping there might be some trick to making the Format property just work.</p>

[{'answer_id': 35405, 'author': 'Jeffrey', 'author_id': 3259, 'author_profile': 'https://Stackoverflow.com/users/3259', 'pm_score': 2, 'selected': True, 'text': '<p>My personal opinion is that a datagridcolumnstyle is the way to go.  Without seeing the code that you have, I can\'t say for certain why your formatting isn\'t taking hold when no style is defined - but mixing in formatting with data calculations and other parts of the code can get very messy very quickly.</p>\n\n<p>Creating a new column style class is very clean, and if you have to use the same formatting again in another datagrid, it\'s as easy as pie to reuse it.</p>\n\n<p>Here\'s the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridcolumnstyle.aspx" rel="nofollow noreferrer">Microsoft Documentation</a> that may get you started in the right direction.</p>\n'}, {'answer_id': 35640, 'author': 'Mike', 'author_id': 785, 'author_profile': 'https://Stackoverflow.com/users/785', 'pm_score': 0, 'selected': False, 'text': "<p>I did subclass and it was easy and did work.  I still don't like it so much.  I was already subclassing column styles for other reasons.  I'd rather handle all databinding myself, where I can more easily change it and test it.  This whole mixing of the UI with the data is old school, and not in a good way.</p>\n\n<p>Thanks very much for your answers, it's good to have second opinions.</p>\n\n<p>Mike</p>\n"}]
['https://Stackoverflow.com/questions/34428', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/785/']