Click here to Skip to main content
15,893,663 members
Home / Discussions / C#
   

C#

 
AnswerRe: calling a parent's form method from a child form Pin
Pete O'Hanlon15-Nov-06 8:47
mvePete O'Hanlon15-Nov-06 8:47 
AnswerRe: calling a parent's form method from a child form Pin
tgrt15-Nov-06 16:16
tgrt15-Nov-06 16:16 
QuestionStatus Of DataReader ? Pin
Raghu Nandan15-Nov-06 7:46
Raghu Nandan15-Nov-06 7:46 
AnswerRe: Status Of DataReader ? Pin
ednrgc15-Nov-06 7:56
ednrgc15-Nov-06 7:56 
QuestionHow to read a textfile character by character in C# Pin
Vijay Mesa15-Nov-06 6:40
Vijay Mesa15-Nov-06 6:40 
AnswerRe: How to read a textfile character by character in C# Pin
Judah Gabriel Himango15-Nov-06 11:54
sponsorJudah Gabriel Himango15-Nov-06 11:54 
QuestiontreeView and contextMenu Pin
h@s@n15-Nov-06 6:19
h@s@n15-Nov-06 6:19 
AnswerRe: treeView and contextMenu Pin
Wjousts15-Nov-06 6:33
Wjousts15-Nov-06 6:33 
Go add a new TreeNode at the same level as a given TreeNode you will need to look at the current TreeNode's parent and add your new node to the parents Nodes collection using the Insert method of the TreeNodeCollection.
A rough example (not tested):
.
.
.
int currentIndex = CurrentTreeNode.Parent.Nodes.IndexOf(CurrentTreeNode);
.
.
.
// to insert before
CurrentTreeNode.Parent.Nodes.Insert(NewNode,currentIndex);
.
.
.
// to insert after
CurrentTreeNode.Parent.Nodes.Insert(NewNode,currentIndex+1);
.
.
.

Note that you should check that the current node isn't the root (parent == null).

To add a child you simply add a new node to the current node using CurrentTreeNode.Add(NewNode)

To disable the menu items you might want to do it on the context menus Popup event.
GeneralRe: treeView and contextMenu Pin
h@s@n15-Nov-06 7:51
h@s@n15-Nov-06 7:51 
AnswerRe: treeView and contextMenu Pin
Scott Dorman15-Nov-06 10:24
professionalScott Dorman15-Nov-06 10:24 
QuestionMulti-Language Implementation Pin
Syed Shahid Hussain15-Nov-06 6:09
Syed Shahid Hussain15-Nov-06 6:09 
QuestionString to Int Pin
Blekk15-Nov-06 6:00
Blekk15-Nov-06 6:00 
AnswerRe: String to Int Pin
Stefan Troschuetz15-Nov-06 6:03
Stefan Troschuetz15-Nov-06 6:03 
GeneralRe: String to Int Pin
Blekk15-Nov-06 6:11
Blekk15-Nov-06 6:11 
AnswerRe: String to Int Pin
Syed Shahid Hussain15-Nov-06 6:16
Syed Shahid Hussain15-Nov-06 6:16 
AnswerRe: String to Int Pin
Jon Sagara15-Nov-06 6:34
Jon Sagara15-Nov-06 6:34 
QuestionDisplaying a Control at Runtime Pin
Gareth H15-Nov-06 5:06
Gareth H15-Nov-06 5:06 
AnswerRe: Displaying a Control at Runtime Pin
led mike15-Nov-06 5:14
led mike15-Nov-06 5:14 
AnswerRe: Displaying a Control at Runtime Pin
vinSharp15-Nov-06 20:22
vinSharp15-Nov-06 20:22 
GeneralRe: Displaying a Control at Runtime Pin
Gareth H15-Nov-06 22:49
Gareth H15-Nov-06 22:49 
GeneralRe: Displaying a Control at Runtime Pin
vinSharp16-Nov-06 0:00
vinSharp16-Nov-06 0:00 
GeneralRe: Displaying a Control at Runtime Pin
Gareth H16-Nov-06 1:23
Gareth H16-Nov-06 1:23 
Questionuse c# to search for an hardware Pin
keroed_edmond15-Nov-06 4:46
keroed_edmond15-Nov-06 4:46 
AnswerRe: use c# to search for an hardware Pin
Judah Gabriel Himango15-Nov-06 11:59
sponsorJudah Gabriel Himango15-Nov-06 11:59 
Questionfilter datagrid bound to arraylist Pin
zamillia zuma15-Nov-06 3:45
zamillia zuma15-Nov-06 3:45 

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.