Click here to Skip to main content
15,881,089 members
Home / Discussions / C#
   

C#

 
GeneralTabpages Pin
Jonathan Slenders9-Jan-04 1:40
Jonathan Slenders9-Jan-04 1:40 
GeneralRe: Tabpages Pin
Heath Stewart9-Jan-04 3:34
protectorHeath Stewart9-Jan-04 3:34 
GeneralRe: Tabpages Pin
Jonathan Slenders10-Jan-04 4:42
Jonathan Slenders10-Jan-04 4:42 
GeneralRe: Tabpages Pin
Heath Stewart10-Jan-04 6:23
protectorHeath Stewart10-Jan-04 6:23 
GeneralDateTimePicker Display Case Pin
Ben Swann8-Jan-04 23:05
Ben Swann8-Jan-04 23:05 
GeneralRe: DateTimePicker Display Case Pin
Mazdak9-Jan-04 0:54
Mazdak9-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
wangier8-Jan-04 16:39 
dataTable1.RowChaging += new DataRowChangeEventHandler(dataTable1_rowChaing)

private void dataTable1_RowChanging(object sender, DataRowChangeEventArgs e)
{
if ( e.Action == DataRowAction.Add )
{
if (...)
throw new ApplicationException("不合法的检查项目!");
}
}


------------
the problem is :
this dataTable is associated to a datagrid, when add a new row through the datagrid, the rowchanging event can be trigered. If the row is invalid, the exception will be throwed, and the new row cannot be added to the dataTable1.
But when should I handle this Exception? I can't catch this exception.
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
wangier8-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
wangier8-Jan-04 21:45 
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
wangier11-Jan-04 18:24 
Questionhow to prevent changing columns' width in datagrid? Pin
wangier8-Jan-04 16:38
wangier8-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
wangier8-Jan-04 20:51 
AnswerRe: how to prevent changing columns' width in datagrid? Pin
Guillermo Rivero8-Jan-04 19:04
Guillermo Rivero8-Jan-04 19:04 
GeneralQuestion about GUI techniques... Interesting, I promise. Pin
madjeux8-Jan-04 15:01
madjeux8-Jan-04 15:01 
GeneralRe: Question about GUI techniques... Interesting, I promise. Pin
Christian Graus8-Jan-04 15:29
protectorChristian Graus8-Jan-04 15:29 
GeneralRe: Question about GUI techniques... Interesting, I promise. Pin
madjeux9-Jan-04 14:34
madjeux9-Jan-04 14:34 
Questionhow to create Componet of my favourite Pict in the ToolBox Pin
meetweb8-Jan-04 14:11
meetweb8-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
Kingvest8-Jan-04 12:53 
GeneralCrystal Reports and Sql Server 2000 Pin
obelisk298-Jan-04 12:34
obelisk298-Jan-04 12:34 

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.