Click here to Skip to main content
15,437,947 members
Home / Discussions / C#
   

C#

 
Questionhow to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 2:02
MemberHervend27-Nov-17 2:02 
AnswerRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 2:21
professionalEddy Vluggen27-Nov-17 2:21 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 2:56
MemberHervend27-Nov-17 2:56 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Eddy Vluggen27-Nov-17 3:26
professionalEddy Vluggen27-Nov-17 3:26 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Hervend27-Nov-17 19:19
MemberHervend27-Nov-17 19:19 
GeneralRe: how to get programmatically the selected item of a treeview dynamically built Pin
Gerry Schmitz27-Nov-17 8:12
mveGerry Schmitz27-Nov-17 8:12 
QuestionWorkaround for a virtual method call in the constructor Pin
CodeWraith25-Nov-17 9:40
MemberCodeWraith25-Nov-17 9:40 
Questionissues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 2:27
MemberHervend24-Nov-17 2: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 2:49
professionalEddy Vluggen24-Nov-17 2:49 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 3:25
MemberHervend24-Nov-17 3:25 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 3:33
professionalEddy Vluggen24-Nov-17 3:33 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:24
MemberHervend24-Nov-17 4:24 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:35
MemberHervend24-Nov-17 4:35 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Eddy Vluggen24-Nov-17 5:15
professionalEddy Vluggen24-Nov-17 5:15 
AnswerRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 3:11
mveOriginalGriff24-Nov-17 3:11 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
Hervend24-Nov-17 4:34
MemberHervend24-Nov-17 4:34 
GeneralRe: issues concerning c# object reference not set to an instance of an object error Pin
OriginalGriff24-Nov-17 4:50
mveOriginalGriff24-Nov-17 4:50 
QuestionDisable Update of xmlns into Report Viewer C# Pin
rikidev23-Nov-17 23:37
Memberrikidev23-Nov-17 23:37 
QuestionHow to locate a window by title Pin
Leif Simon Goodwin23-Nov-17 20:53
MemberLeif Simon Goodwin23-Nov-17 20:53 
AnswerRe: How to locate a window by title Pin
Eddy Vluggen24-Nov-17 2:48
professionalEddy Vluggen24-Nov-17 2:48 
GeneralRe: How to locate a window by title Pin
Leif Simon Goodwin24-Nov-17 3:32
MemberLeif Simon Goodwin24-Nov-17 3:32 
QuestionDelete only the rows that has a particular Column value using C# code Pin
Member 1245769023-Nov-17 14:43
MemberMember 1245769023-Nov-17 14:43 
AnswerRe: Delete only the rows that has a particular Column value using C# code Pin
Eddy Vluggen24-Nov-17 2:46
professionalEddy Vluggen24-Nov-17 2:46 
QuestionHow to refresh reportviewer when SQL input data changed Pin
C Sharp coder 201823-Nov-17 14:29
MemberC Sharp coder 201823-Nov-17 14:29 
AnswerRe: How to refresh reportviewer when SQL input data changed Pin
Eddy Vluggen24-Nov-17 2:44
professionalEddy Vluggen24-Nov-17 2: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.