Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to insert listbox items in to array object..? Pin
#realJSOP10-Jun-08 0:12
professional#realJSOP10-Jun-08 0:12 
Questiontrailing zero in Decimal Pin
George_George9-Jun-08 0:21
George_George9-Jun-08 0:21 
AnswerRe: trailing zero in Decimal Pin
Ashfield9-Jun-08 1:26
Ashfield9-Jun-08 1:26 
GeneralRe: trailing zero in Decimal Pin
George_George9-Jun-08 1:41
George_George9-Jun-08 1:41 
GeneralRe: trailing zero in Decimal Pin
Ashfield9-Jun-08 2:57
Ashfield9-Jun-08 2:57 
GeneralRe: trailing zero in Decimal Pin
George_George9-Jun-08 16:06
George_George9-Jun-08 16:06 
QuestionWhat is position of .Net winform developer in developers market? Pin
Abdul Gafoor9-Jun-08 0:13
Abdul Gafoor9-Jun-08 0:13 
AnswerRe: What is position of .Net winform developer in developers market? Pin
Gareth H9-Jun-08 0:24
Gareth H9-Jun-08 0:24 
AnswerRe: What is position of .Net winform developer in developers market? Pin
rah_sin9-Jun-08 0:25
professionalrah_sin9-Jun-08 0:25 
AnswerRe: What is position of .Net winform developer in developers market? Pin
#realJSOP9-Jun-08 2:46
professional#realJSOP9-Jun-08 2:46 
QuestionTimer Controll in Thread Pin
DeepOceans8-Jun-08 23:51
DeepOceans8-Jun-08 23:51 
AnswerRe: Timer Controll in Thread Pin
Gareth H9-Jun-08 1:04
Gareth H9-Jun-08 1:04 
GeneralRe: Timer Controll in Thread Pin
DeepOceans9-Jun-08 1:22
DeepOceans9-Jun-08 1:22 
AnswerRe: Timer Controll in Thread Pin
#realJSOP9-Jun-08 2:51
professional#realJSOP9-Jun-08 2:51 
AnswerRe: Timer Controll in Thread Pin
PIEBALDconsult9-Jun-08 5:51
mvePIEBALDconsult9-Jun-08 5:51 
GeneralRe: Timer Controll in Thread Pin
#realJSOP9-Jun-08 5:54
professional#realJSOP9-Jun-08 5:54 
GeneralRe: Timer Controll in Thread Pin
PIEBALDconsult9-Jun-08 13:41
mvePIEBALDconsult9-Jun-08 13:41 
GeneralRe: Timer Controll in Thread Pin
#realJSOP10-Jun-08 0:11
professional#realJSOP10-Jun-08 0:11 
Questionserialize atextbox control Pin
Elesh8-Jun-08 23:41
Elesh8-Jun-08 23:41 
GeneralRe: serialize atextbox control Pin
ncjlee9-Jun-08 0:33
ncjlee9-Jun-08 0:33 
QuestionListBox throwing a "Not valid value"-exception Pin
Gadjuka8-Jun-08 23:14
Gadjuka8-Jun-08 23:14 
Hi all!

I'm having a problem with checkedlistbox.
At one point I want to update the data associated with the selected item, which is a struct I defined. When I try to do this I get an error:
"Specified argument was out of the range of valid values.Parameter name: '-1'is not a valid value for 'index'"
And then the last item in the list is removed.

CheckedListBoxItem temp = (CheckedListBoxItem)clbFormats.Items[clbFormats.SelectedIndex];
temp.Update = chkUpdate.Checked;
clbFormats.Items[clbFormats.SelectedIndex] = temp;	// <-- This is where it raises an error


The thing is that clbFormats.SelectedIndex isn't -1, it's 0 if I add it to the watch window. And if I do that same with clbFormats.Items[clbFormats.SelectedIndex] it also shows the correct, valid values.
And what's even stranger is that this code works if I compile it in VS2005, unfortunately I have to use VS2003.

/Gadjuka
AnswerRe: ListBox throwing a "Not valid value"-exception Pin
#realJSOP9-Jun-08 2:57
professional#realJSOP9-Jun-08 2:57 
GeneralRe: ListBox throwing a "Not valid value"-exception Pin
Gadjuka9-Jun-08 20:02
Gadjuka9-Jun-08 20:02 
GeneralRe: ListBox throwing a "Not valid value"-exception Pin
#realJSOP10-Jun-08 0:10
professional#realJSOP10-Jun-08 0:10 
QuestionSortedDictionary v.s. Dictionary Pin
George_George8-Jun-08 22:41
George_George8-Jun-08 22:41 

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.