DataGridView doesn't show error icons
DataGridView doesn't show error iconsOld forum URL: forums.lhotka.net/forums/t/7052.aspx
JonM posted on Friday, June 05, 2009I have a strange issue. I've used this model several times before. I have one form where it doesn't work. I'm binding a editable collection to a datagridview. For some reason the broken rules don't show explanation points in the datagridview. I have verified that the rules are indeed in the brokenrule list as errors. I'm stumped here. In the past I have not had to do any coding in the UI to get the error icon in a datagridview. Any ideas here?
GWZ replied on Friday, June 05, 2009Insure that an Error Provider is in the form and that the DataSource property is set to binding source of your business object ( the same binding source as the DataGridView).
JonnyBee replied on Friday, June 05, 2009Hi,
I assume we are discussing Window Forms DataGridView.
Make sure your RowTemplate.Height is at least 21 pixels. If height is less than 21 the DataGridView will not show any error icons (not even a "clipped" image)
And - the DataGridView has its own ErrorProvider implementation. There is no need for an additional ErrorProvider in your form in order to show errors in a DataGridView.
Copyright (c) Marimer LLC