Click here to Skip to main content
15,501,747 members
Home / Discussions / C#
   

C#

 
Questionhow to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 3:02
MemberHervend27-Nov-17 3:02 
AnswerRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 3:21
professionalEddy Vluggen27-Nov-17 3:21 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 3:56
MemberHervend27-Nov-17 3:56 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 4:26
professionalEddy Vluggen27-Nov-17 4:26 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 20:19
MemberHervend27-Nov-17 20:19 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Gerry Schmitz27-Nov-17 9:12
mveGerry Schmitz27-Nov-17 9:12 
QuestionWorkaround for a virtual method call in the constructor Pin
CodeWraith25-Nov-17 10:40
MemberCodeWraith25-Nov-17 10:40 
Questionissues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 3:27
MemberHervend24-Nov-17 3:27 
Hi everybody,

Could someone help me with the issue mentionned in the title?

I get NULLReference exception at line "EqtLevel2[] eqtlevel2 = EqtListDataBase.GetSetOfEqtLevel2(eqtlevel1[i]);" when running the code below.

Thank you for your answers.

RV

public TreeViewItem BuildTreeView ()
{
TreeViewItem TreeView = new TreeViewItem();
EqtLevel2[] eqtlevel2;
//EqtLevel3[] eqtlevel3;
EqtLevel1[] eqtlevel1 = EqtListDataBase.GetSetOfEqtLevel1(_eqtlist);

for (int i = 0; i < eqtlevel1.Length; i++)
{
TreeViewItem ParentItem = new TreeViewItem() { Header = eqtlevel1[i].EqtLevel1Name };
EqtLevel2[] eqtlevel2 = EqtListDataBase.GetSetOfEqtLevel2(eqtlevel1[i]);
for (int j = 0; j < eqtlevel2.Length; j++)
{
/*TreeViewItem Child2Item = new TreeViewItem() { Header =
eqtlevel2[j].EqtLevel2Name };
eqtlevel3 = EqtListDataBase.GetSetOfEqtLevel3(eqtlevel2[j]);
for (int k = 0; k < eqtlevel3.Length; k++)
{
TreeViewItem Child3Item = new TreeViewItem() { Header =
eqtlevel3[k].EqtLevel3Name};
Child2Item.Items.Add(Child3Item);
}
ParentItem.Items.Add(Child2Item);
*/
}
TreeView.Items.Add(ParentItem);
}
return TreeView;
}
AnswerRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 3:49
professionalEddy Vluggen24-Nov-17 3:49 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:25
MemberHervend24-Nov-17 4:25 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 4:33
professionalEddy Vluggen24-Nov-17 4:33 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 5:24
MemberHervend24-Nov-17 5:24 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 5:35
MemberHervend24-Nov-17 5:35 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 6:15
professionalEddy Vluggen24-Nov-17 6:15 
AnswerRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 4:11
mveOriginalGriff24-Nov-17 4:11 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 5:34
MemberHervend24-Nov-17 5:34 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 5:50
mveOriginalGriff24-Nov-17 5:50 
QuestionDisable Update of xmlns into Report Viewer C# Pin
rikidev24-Nov-17 0:37
Memberrikidev24-Nov-17 0:37 
QuestionHow to locate a window by title Pin
Leif Simon Goodwin23-Nov-17 21:53
MemberLeif Simon Goodwin23-Nov-17 21:53 
AnswerRe: How to locate a window by title Pin
Eddy Vluggen24-Nov-17 3:48
professionalEddy Vluggen24-Nov-17 3:48 
GeneralRe: How to locate a window by title Pin
Leif Simon Goodwin24-Nov-17 4:32
MemberLeif Simon Goodwin24-Nov-17 4:32 
QuestionDelete only the rows that has a particular Column value using C# code Pin
Member 1245769023-Nov-17 15:43
MemberMember 1245769023-Nov-17 15:43 
AnswerRe: Delete only the rows that has a particular Column value using C# code Pin
Eddy Vluggen24-Nov-17 3:46
professionalEddy Vluggen24-Nov-17 3:46 
QuestionHow to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201823-Nov-17 15:29
MemberC Sharp coder 201823-Nov-17 15:29 
AnswerRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 3:44
professionalEddy Vluggen24-Nov-17 3:44 

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.