Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Is it possible to 'hook up' my exception to the DataError event of a DataGridView?
 

Is it possible to 'hook up' my exception to the DataError event of a DataGridView?

I have a DataSet's DataTable bound to a DataGridView. I want the DataError event of the DataGridView to get the exception that I throw in the ColumnChanging event handler of the DataTable. Is this possible? If so, how?

See my previous post (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=548700&SiteID=1) for details

Thanks to all who may help.

jjjjjjj  Wednesday, July 19, 2006 1:27 PM

You would have to implement a custom DataGridView class and provide a public method to accept some Exception object which would then call DataGridView.OnDataError().

Peter Ritchie  Wednesday, July 19, 2006 4:09 PM

You would have to implement a custom DataGridView class and provide a public method to accept some Exception object which would then call DataGridView.OnDataError().

Peter Ritchie  Wednesday, July 19, 2006 4:09 PM

You can use google to search for other answers

Custom Search

More Threads

• DataGridViewAutoFilter.dll
• DataGridViewRow.DataBoundItem Throws Exception
• TypedDataset - Partial Class - Adding new Column to appear in Bindable controls
• Adding a Data Connection that's specific to the Project/Form and making the Data Source path dynamic...
• Add row in datagridview in Cell validate Event
• Saving changes in DataGridView
• a beginner question about databinding a combo box
• Error in OleDBConnection : Object reference not set to an instance of an object
• Coloring and individual Cell on DataGridView
• Seelcting more than one row in a DataGrid