Click here to Skip to main content
15,353,470 members
Home / Discussions / C#
   

C#

 
GeneralDateTimePicker Display Case Pin
Ben Swann8-Jan-04 23:05
MemberBen Swann8-Jan-04 23:05 
GeneralRe: DateTimePicker Display Case Pin
Mazdak9-Jan-04 0:54
MemberMazdak9-Jan-04 0:54 
Generalfonts (maybe) Pin
brain2cpu8-Jan-04 19:57
professionalbrain2cpu8-Jan-04 19:57 
Questionhow to reject the invalid row adding to datatable? Pin
wangier8-Jan-04 16:39
Memberwangier8-Jan-04 16:39 
AnswerRe: how to reject the invalid row adding to datatable? Pin
Heath Stewart8-Jan-04 17:15
protectorHeath Stewart8-Jan-04 17:15 
GeneralRe: how to reject the invalid row adding to datatable? Pin
wangier8-Jan-04 17:20
Memberwangier8-Jan-04 17:20 
GeneralRe: how to reject the invalid row adding to datatable? Pin
Heath Stewart8-Jan-04 18:53
protectorHeath Stewart8-Jan-04 18:53 
GeneralRe: how to reject the invalid row adding to datatable? Pin
wangier8-Jan-04 21:45
Memberwangier8-Jan-04 21:45 
I did that. And I throw a ErrorDataRowException which inherits from Application in the data table's RowChanging event.
But when the ErrorDataRowException is thrown, the application didnot enter the method UnHandledExceptionHandler. Instead, the application still popup an window in which told me there is an unhandled exception.
why? pls help me.

[STAThread]
static void Main()
{
AppDomain currentAppDomain = AppDomain.CurrentDomain;
currentAppDomain.UnhandledException += new UnhandledExceptionEventHandler(UnHandledExceptionHandler);

FormRegisterConsole fmMain = new FormRegisterConsole();
Application.Run(fmMain);
}

private static void UnHandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
{
Exception e = (Exception) args.ExceptionObject;
if (e.GetType() == typeof(Health.ApplicationLibrary.RIS.Register.ErrorDataRowException))
{
MessageBox.Show(e.Message, "data updating", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
MessageBox.Show("出现未处理错误: " + e.Message, "未处理错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}


GeneralRe: how to reject the invalid row adding to datatable? Pin
Heath Stewart9-Jan-04 3:50
protectorHeath Stewart9-Jan-04 3:50 
GeneralRe: how to reject the invalid row adding to datatable? Pin
wangier11-Jan-04 18:24
Memberwangier11-Jan-04 18:24 
Questionhow to prevent changing columns' width in datagrid? Pin
wangier8-Jan-04 16:38
Memberwangier8-Jan-04 16:38 
AnswerRe: how to prevent changing columns' width in datagrid? Pin
Heath Stewart8-Jan-04 17:12
protectorHeath Stewart8-Jan-04 17:12 
GeneralRe: how to prevent changing columns' width in datagrid? Pin
wangier8-Jan-04 20:51
Memberwangier8-Jan-04 20:51 
AnswerRe: how to prevent changing columns' width in datagrid? Pin
Guillermo Rivero8-Jan-04 19:04
MemberGuillermo Rivero8-Jan-04 19:04 
GeneralQuestion about GUI techniques... Interesting, I promise. Pin
madjeux8-Jan-04 15:01
Membermadjeux8-Jan-04 15:01 
GeneralRe: Question about GUI techniques... Interesting, I promise. Pin
Christian Graus8-Jan-04 15:29
mveChristian Graus8-Jan-04 15:29 
GeneralRe: Question about GUI techniques... Interesting, I promise. Pin
madjeux9-Jan-04 14:34
Membermadjeux9-Jan-04 14:34 
Questionhow to create Componet of my favourite Pict in the ToolBox Pin
meetweb8-Jan-04 14:11
Membermeetweb8-Jan-04 14:11 
AnswerRe: how to create Componet of my favourite Pict in the ToolBox Pin
Heath Stewart8-Jan-04 16:50
protectorHeath Stewart8-Jan-04 16:50 
GeneralFIX Gateway Server Pin
Kingvest8-Jan-04 12:53
MemberKingvest8-Jan-04 12:53 
GeneralCrystal Reports and Sql Server 2000 Pin
obelisk298-Jan-04 12:34
Memberobelisk298-Jan-04 12:34 
GeneralRe: Crystal Reports and Sql Server 2000 Pin
Heath Stewart8-Jan-04 12:46
protectorHeath Stewart8-Jan-04 12:46 
GeneralRe: Crystal Reports and Sql Server 2000 Pin
obelisk298-Jan-04 13:01
Memberobelisk298-Jan-04 13:01 
GeneralRe: Crystal Reports and Sql Server 2000 Pin
Heath Stewart8-Jan-04 13:11
protectorHeath Stewart8-Jan-04 13:11 
GeneralRe: Crystal Reports and Sql Server 2000 Pin
obelisk298-Jan-04 13:20
Memberobelisk298-Jan-04 13:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.