Click here to Skip to main content
15,920,801 members
Home / Discussions / C#
   

C#

 
AnswerRe: CheckListBox ...selct singlr item Pin
Jasmine250123-Nov-06 22:46
Jasmine250123-Nov-06 22:46 
AnswerRe: CheckListBox ...selct singlr item Pin
ejuanpp24-Nov-06 0:13
ejuanpp24-Nov-06 0:13 
QuestionDrag Drop functionality in DataGridView Pin
Lalit Ahuja23-Nov-06 22:31
Lalit Ahuja23-Nov-06 22:31 
QuestionHow to copy a datarow from myDataTable to another datatable ? Pin
hdv21223-Nov-06 21:51
hdv21223-Nov-06 21:51 
AnswerRe: How to copy a datarow from myDataTable to another datatable ? Pin
Eduard Keilholz23-Nov-06 22:32
Eduard Keilholz23-Nov-06 22:32 
QuestionGetService cast problem in form Designer Pin
man shar23-Nov-06 21:39
man shar23-Nov-06 21:39 
QuestionListview index problem Pin
GermanDM23-Nov-06 21:08
GermanDM23-Nov-06 21:08 
AnswerRe: Listview index problem Pin
Jasmine250123-Nov-06 21:25
Jasmine250123-Nov-06 21:25 
I had this problem too. When I debugged it, I noticed that it was calling my event handler twice if I changed from one selected item to another, but only once if I had nothing selected and I clicked one. This makes sense because when the selection changes from one item to another, it has to deselect the current item, which fires the 'Changed' event, and then it selects the new item, firing the event again.

The first time the event gets called, there is no selection (SelectedItems has a size of 0), so you will get an InvalidArgument or possibly the "Object reference not set to an instance of an object" error. All you need to do is add a check to see if any items are selected. You can do that by examining the Count property of SelectedItems.

"Quality Software since 1983!"
http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!

Questionremote execution Pin
ingsgr01@gmail.com23-Nov-06 20:42
ingsgr01@gmail.com23-Nov-06 20:42 
AnswerRe: remote execution Pin
Pete O'Hanlon24-Nov-06 1:26
mvePete O'Hanlon24-Nov-06 1:26 
QuestionNeed a custom Explorer... Pin
Waqas Nasir23-Nov-06 20:36
Waqas Nasir23-Nov-06 20:36 
AnswerRe: Need a custom Explorer... Pin
Jasmine250123-Nov-06 21:01
Jasmine250123-Nov-06 21:01 
AnswerRe: Need a custom Explorer... Pin
Stefan Troschuetz23-Nov-06 21:24
Stefan Troschuetz23-Nov-06 21:24 
QuestionAbout SqlConnection String in App.config file Pin
mwith23-Nov-06 20:35
mwith23-Nov-06 20:35 
AnswerRe: About SqlConnection String in App.config file Pin
Eduard Keilholz23-Nov-06 21:07
Eduard Keilholz23-Nov-06 21:07 
GeneralRe: About SqlConnection String in App.config file Pin
mwith23-Nov-06 21:19
mwith23-Nov-06 21:19 
GeneralRe: About SqlConnection String in App.config file Pin
Jasmine250123-Nov-06 21:27
Jasmine250123-Nov-06 21:27 
AnswerRe: About SqlConnection String in App.config file Pin
Jasmine250123-Nov-06 21:16
Jasmine250123-Nov-06 21:16 
GeneralRe: About SqlConnection String in App.config file Pin
Russell Jones23-Nov-06 21:31
Russell Jones23-Nov-06 21:31 
GeneralRe: About SqlConnection String in App.config file Pin
Eduard Keilholz23-Nov-06 22:36
Eduard Keilholz23-Nov-06 22:36 
GeneralRe: About SqlConnection String in App.config file Pin
Jasmine250123-Nov-06 22:43
Jasmine250123-Nov-06 22:43 
GeneralRe: About SqlConnection String in App.config file Pin
Eduard Keilholz23-Nov-06 22:57
Eduard Keilholz23-Nov-06 22:57 
AnswerRe: About SqlConnection String in App.config file Pin
Colin Angus Mackay24-Nov-06 3:35
Colin Angus Mackay24-Nov-06 3:35 
Question[Message Deleted] Pin
PREMSONBABY23-Nov-06 19:59
PREMSONBABY23-Nov-06 19:59 
AnswerRe: Hi regarding ERP Pin
Jasmine250123-Nov-06 20:30
Jasmine250123-Nov-06 20:30 

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.