Click here to Skip to main content
15,920,383 members
Home / Discussions / C#
   

C#

 
QuestionDoes anybody have ups rate calculator for asp.net? Pin
bigeyed29-Mar-10 7:15
bigeyed29-Mar-10 7:15 
AnswerRe: Does anybody have ups rate calculator for asp.net? Pin
Not Active29-Mar-10 7:28
mentorNot Active29-Mar-10 7:28 
AnswerRe: Does anybody have ups rate calculator for asp.net? Pin
Dave Kreskowiak29-Mar-10 9:57
mveDave Kreskowiak29-Mar-10 9:57 
Questiondid you Google Block Gmail?! Pin
Jassim Rahma29-Mar-10 5:50
Jassim Rahma29-Mar-10 5:50 
AnswerRe: did you Google Block Gmail?! Pin
Richard MacCutchan29-Mar-10 6:41
mveRichard MacCutchan29-Mar-10 6:41 
GeneralRe: did you Google Block Gmail?! Pin
Jassim Rahma29-Mar-10 11:30
Jassim Rahma29-Mar-10 11:30 
GeneralRe: did you Google Block Gmail?! [modified] Pin
Richard MacCutchan29-Mar-10 11:41
mveRichard MacCutchan29-Mar-10 11:41 
QuestionTreeview aftercheck Pin
Wannes Geysen29-Mar-10 5:21
Wannes Geysen29-Mar-10 5:21 
Hi,

I want to do the following:
1) when a node is checked, all the child nodes must be checked
2) when a node is unchecked, uncheck all the child nodes and see if there is at least one other node which is checked.

Because the method AfterCheck is launched after every change of the checked state, this method will also be launched when a childnode is checked/unchecked.
So when a node is unchecked, the recursive method to see if there is at least one node in the treeview still checked, will be launched for every child node.
Is there a way to only launch this method once instead of once a node?

code:
private void treeViewRekeningen_AfterCheck(object sender, TreeViewEventArgs e)
{
	Boolean ret = false;
	TreeNode node = e.Node;
	if (node.Nodes != null)
	{
		foreach (TreeNode subnode in node.Nodes)
		{
			subnode.Checked = node.Checked;
		}
	}

	if (e.Node.Checked == true)
	{
		ret = true;
	}
	else
	{
		doorloopTreeview(node, ref ret);
	}
	if (ret == false)
	{
		Console.WriteLine("No node is checked")
	}
	else
	{
		Console.WriteLine("At least one node is checked")
	}
}

private void doorloopTreeview(TreeNode parent, ref Boolean gevonden)
{
	if (gevonden == false)
	{
		foreach (TreeNode node in parent.Nodes)
		{
			doorloopTreeview(node, ref gevonden);
		}
		if (parent.Checked == true)
			gevonden = true;
	}
}

AnswerRe: Treeview aftercheck Pin
Kevin Marois29-Mar-10 5:28
professionalKevin Marois29-Mar-10 5:28 
AnswerRe: Treeview aftercheck Pin
Tarakeshwar Reddy29-Mar-10 6:44
professionalTarakeshwar Reddy29-Mar-10 6:44 
GeneralRe: Treeview aftercheck Pin
Wannes Geysen29-Mar-10 21:25
Wannes Geysen29-Mar-10 21:25 
QuestionGet list of groups for a given user using ActiveDirectory Pin
QuickDeveloper29-Mar-10 2:18
QuickDeveloper29-Mar-10 2:18 
AnswerRe: Get list of groups for a given user using ActiveDirectory Pin
Abhinav S29-Mar-10 4:05
Abhinav S29-Mar-10 4:05 
QuestionAutomatic Server Shutdown Pin
FJJCENTU29-Mar-10 0:18
FJJCENTU29-Mar-10 0:18 
AnswerRe: Automatic Server Shutdown Pin
DaveyM6929-Mar-10 0:48
professionalDaveyM6929-Mar-10 0:48 
AnswerRe: Automatic Server Shutdown Pin
David Skelly29-Mar-10 1:56
David Skelly29-Mar-10 1:56 
AnswerRe: Automatic Server Shutdown Pin
Dave Kreskowiak29-Mar-10 3:43
mveDave Kreskowiak29-Mar-10 3:43 
QuestionRemoving items from list while performing operations on it Pin
xkrja29-Mar-10 0:17
xkrja29-Mar-10 0:17 
AnswerRe: Removing items from list while performing operations on it Pin
Keith Barrow29-Mar-10 0:47
professionalKeith Barrow29-Mar-10 0:47 
AnswerRe: Removing items from list while performing operations on it Pin
SeMartens29-Mar-10 0:48
SeMartens29-Mar-10 0:48 
Questionusing (SqlTransaction... ) Pin
Dewald29-Mar-10 0:12
Dewald29-Mar-10 0:12 
AnswerRe: using (SqlTransaction... ) Pin
Eddy Vluggen29-Mar-10 1:06
professionalEddy Vluggen29-Mar-10 1:06 
AnswerRe: using (SqlTransaction... ) Pin
Keith Barrow29-Mar-10 1:07
professionalKeith Barrow29-Mar-10 1:07 
AnswerRe: using (SqlTransaction... ) Pin
PSK_29-Mar-10 1:08
PSK_29-Mar-10 1:08 
GeneralRe: using (SqlTransaction... ) Pin
Dewald29-Mar-10 1:51
Dewald29-Mar-10 1:51 

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.