Print Page | Close Window

Returning exception from custom data converter and showing the exception message in messagebox on UI.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=641
Printed Date: 06-Sep-2025 at 6:48am


Topic: Returning exception from custom data converter and showing the exception message in messagebox on UI.
Posted By: mehajain
Subject: Returning exception from custom data converter and showing the exception message in messagebox on UI.
Date Posted: 31-Dec-2007 at 3:23am

Hi All

I have created a custom data converter. What I need to do is to compare the object value to a particular format and show a message to user in case the value is not in correct format.

I tried by writing following code in ValidateCore() function
throw new ConverterException("Input string not in correct format");
But it returns error -" 'IdeaBlade.UI.ConverterException' occurred but was not handled in user code".

How can I do this?




Replies:
Posted By: IdeaBlade
Date Posted: 02-Jan-2008 at 8:22pm
Try looking at this example which displays an error if the FirstName of the Employee does not begin with "Al".
 
Here is the code:
 
http://www.ideablade.com/forum/uploads/20080102_231530_FirstNameConver.zip - uploads/20080102_231530_FirstNameConver.zip
 
Here is the documentation:
 
http://www.ideablade.com/forum/uploads/20080102_232207_Custom_DataConv.zip - uploads/20080102_232207_Custom_DataConv.zip



Print Page | Close Window