Click here to Skip to main content
16,013,581 members
Home / Discussions / C#
   

C#

 
QuestionUsing a Session variable in an UpdateCommand Pin
JohnQuar16-Aug-09 9:17
JohnQuar16-Aug-09 9:17 
AnswerRe: Using a Session variable in an UpdateCommand [ Posted on Wrong Forum ] Pin
Abhijit Jana6-Aug-09 9:24
professionalAbhijit Jana6-Aug-09 9:24 
QuestionMS word tables using C# Pin
Member 41540746-Aug-09 9:00
Member 41540746-Aug-09 9:00 
AnswerRe: MS word tables using C# Pin
toby316-Aug-09 12:01
toby316-Aug-09 12:01 
GeneralRe: MS word tables using C# Pin
Member 41540746-Aug-09 21:51
Member 41540746-Aug-09 21:51 
GeneralRe: MS word tables using C# Pin
toby316-Aug-09 22:09
toby316-Aug-09 22:09 
GeneralRe: MS word tables using C# Pin
Member 41540747-Aug-09 7:58
Member 41540747-Aug-09 7:58 
QuestionProblem Calling CheckListBox Pin
Member 28652716-Aug-09 7:31
Member 28652716-Aug-09 7:31 
Can someone help with an issue I'm having with a CheckListBox.

I have two Forms lets say Form1 - Form2, Form2 contains a CheckListBox that accepts input from the user I've also created a Foreach statement to Iterate through the CheckListBox on Form2 Form1 has a button coded to call Form2 Foreach method everything seems to work except for one problem when making the call to Form2 the Foreach method indicates the CheckListBox is Null although the CheckListbox contains item's, so as a test I created a button on Form2 and wired it to call the Foreach method on Form2 and all works the Foreach Method see's the Item's and perform the Iteration on all Item's where as making the call from Form1 indicate a Null CheckListBox. I'm not sure if this is a Threading issue do to the fact Form1 is creating a new Object to access Form2 Foreach method ?

FORM1

button1_Click(object sender, EventArgs e)  
{
    List.Form2 List = new List.From2();
      List.ChkList();
}


FORM 2
Public void ChkList()
 
   foreach (string s in checkedListBox1.Items)
   
    {
        if (s.Equals(dt))
         { Do Work
    }


FORM2 Test Button.

button2_Click(object sender, EventArgs e)

{
   List.Form2 List = new List.From2();
      List.ChkList();
}

AnswerRe: Problem Calling CheckListBox Pin
Andrew Rissing6-Aug-09 7:56
Andrew Rissing6-Aug-09 7:56 
AnswerRe: Problem Calling CheckListBox Pin
Luc Pattyn6-Aug-09 7:56
sitebuilderLuc Pattyn6-Aug-09 7:56 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 11:48
Member 28652716-Aug-09 11:48 
AnswerRe: Problem Calling CheckListBox Pin
DaveyM696-Aug-09 11:14
professionalDaveyM696-Aug-09 11:14 
GeneralRe: Problem Calling CheckListBox Pin
Member 28652716-Aug-09 15:01
Member 28652716-Aug-09 15:01 
Questionread Sql DataBase Error Pin
toby316-Aug-09 7:28
toby316-Aug-09 7:28 
AnswerRe: read Sql DataBase Error Pin
musefan6-Aug-09 7:32
musefan6-Aug-09 7:32 
GeneralRe: read Sql DataBase Error Pin
toby316-Aug-09 7:34
toby316-Aug-09 7:34 
GeneralRe: read Sql DataBase Error Pin
Ashfield6-Aug-09 8:51
Ashfield6-Aug-09 8:51 
AnswerRe: read Sql DataBase Error Pin
dan!sh 6-Aug-09 8:52
professional dan!sh 6-Aug-09 8:52 
AnswerRe: read Sql DataBase Error Pin
toby317-Aug-09 0:33
toby317-Aug-09 0:33 
QuestionC# PDB symbols Pin
nachiket076-Aug-09 7:23
nachiket076-Aug-09 7:23 
AnswerRe: C# PDB symbols Pin
Eddy Vluggen6-Aug-09 8:19
professionalEddy Vluggen6-Aug-09 8:19 
GeneralRe: C# PDB symbols Pin
nachiket076-Aug-09 8:24
nachiket076-Aug-09 8:24 
GeneralRe: C# PDB symbols Pin
Eddy Vluggen6-Aug-09 8:46
professionalEddy Vluggen6-Aug-09 8:46 
GeneralRe: C# PDB symbols Pin
nachiket076-Aug-09 8:54
nachiket076-Aug-09 8:54 
GeneralRe: C# PDB symbols Pin
Eddy Vluggen6-Aug-09 11:34
professionalEddy Vluggen6-Aug-09 11: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.