Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralMain Form Pin
Gary Kirkham9-Jan-04 7:21
Gary Kirkham9-Jan-04 7:21 
GeneralRe: Main Form Pin
Alex Korchemniy9-Jan-04 9:16
Alex Korchemniy9-Jan-04 9:16 
GeneralComparing dates Pin
jnngill9-Jan-04 5:57
jnngill9-Jan-04 5:57 
GeneralRe: Comparing dates Pin
TigerNinja_9-Jan-04 6:39
TigerNinja_9-Jan-04 6:39 
GeneralRe: Comparing dates Pin
Richard Deeming9-Jan-04 6:40
mveRichard Deeming9-Jan-04 6:40 
GeneralRe: Comparing dates Pin
jnngill9-Jan-04 7:46
jnngill9-Jan-04 7:46 
GeneralHelp Pls Pin
extremeg9-Jan-04 5:39
extremeg9-Jan-04 5:39 
GeneralRe: Help Pls Pin
TigerNinja_9-Jan-04 6:42
TigerNinja_9-Jan-04 6:42 
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 
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 
Sorry about that. I've been doing so much control development lately I'm too used to such events being CancelEventHandler events (or similar)!

Yes, you'll have to throw the exception so add a handler to AppDomain.UnhandledException like I mentioned before. I recommend you also create a custom exception class that derives from ApplicationException (typically used for custom exceptions to give them a common, application-based base class) that you throw from the DataTable.RowChanging event handler. This way, you can easily just catch this exception in the handler for the AppDomain.UnhandledException event and handle appropriately, which is better than throwing such a oft-used exception and trying to determine where it came from and why it was thrown.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
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 

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.