Click here to Skip to main content
15,867,594 members
Home / Discussions / C#
   

C#

 
QuestionRegular expressions. Pin
Septimus Hedgehog31-Jul-13 3:06
Septimus Hedgehog31-Jul-13 3:06 
AnswerRe: Regular expressions. Pin
Pete O'Hanlon31-Jul-13 3:09
subeditorPete O'Hanlon31-Jul-13 3:09 
GeneralRe: Regular expressions. Pin
Septimus Hedgehog31-Jul-13 3:15
Septimus Hedgehog31-Jul-13 3:15 
QuestionTreeview in windows application Pin
Arun kumar Gautam31-Jul-13 0:26
Arun kumar Gautam31-Jul-13 0:26 
AnswerRe: Treeview in windows application Pin
Simon_Whale31-Jul-13 0:46
Simon_Whale31-Jul-13 0:46 
AnswerRe: Treeview in windows application Pin
Abhinav S31-Jul-13 1:12
Abhinav S31-Jul-13 1:12 
QuestionRe: Treeview in windows application Pin
Eddy Vluggen31-Jul-13 3:16
professionalEddy Vluggen31-Jul-13 3:16 
AnswerRe: Treeview in windows application Pin
Arun kumar Gautam31-Jul-13 3:19
Arun kumar Gautam31-Jul-13 3:19 
wel m now able to resolve it by using

#region TreeView
private void CheckChildNode(TreeNode currNode)
{
//set the children check status to the same as the current node
bool checkStatus = currNode.Checked;
foreach (TreeNode node in currNode.Nodes)
{
node.Checked = checkStatus;
CheckChildNode(node);
}
}
private void CheckParentNode(TreeNode currNode)
{
TreeNode parentNode = currNode.Parent;
if (parentNode == null)
return;
parentNode.Checked = true;
foreach (TreeNode node in parentNode.Nodes)
{
if (!node.Checked)
{
parentNode.Checked = false;
break; // TODO: might not be correct. Was : Exit For
}
}
CheckParentNode(parentNode);
}
#endregion
C#
private void menuCollection_AfterCheck(object sender, TreeViewEventArgs e)
        {
            menuCollection.AfterCheck -= menuCollection_AfterCheck;
            CheckChildNode(e.Node);
            CheckParentNode(e.Node);
            menuCollection.AfterCheck+=menuCollection_AfterCheck;
        }


hope this code helps someone in future
QuestionProblem with treeview in windows application Pin
Arun kumar Gautam31-Jul-13 0:25
Arun kumar Gautam31-Jul-13 0:25 
QuestionOO Design Pin
KeithF30-Jul-13 22:53
KeithF30-Jul-13 22:53 
QuestionRe: OO Design Pin
Eddy Vluggen31-Jul-13 8:36
professionalEddy Vluggen31-Jul-13 8:36 
AnswerRe: OO Design Pin
KeithF31-Jul-13 21:58
KeithF31-Jul-13 21:58 
Questionfilter interface Pin
Atul Kumar Singh230-Jul-13 19:44
Atul Kumar Singh230-Jul-13 19:44 
AnswerRe: filter interface Pin
Abhinav S30-Jul-13 19:53
Abhinav S30-Jul-13 19:53 
GeneralRe: filter interface Pin
Atul Kumar Singh21-Aug-13 6:35
Atul Kumar Singh21-Aug-13 6:35 
AnswerRe: filter interface Pin
Richard Andrew x641-Aug-13 11:22
professionalRichard Andrew x641-Aug-13 11:22 
QuestionGeneric Report Running Pin
eddieangel30-Jul-13 9:43
eddieangel30-Jul-13 9:43 
AnswerRe: Generic Report Running Pin
Mycroft Holmes30-Jul-13 12:40
professionalMycroft Holmes30-Jul-13 12:40 
GeneralRe: Generic Report Running Pin
eddieangel30-Jul-13 12:49
eddieangel30-Jul-13 12:49 
GeneralRe: Generic Report Running Pin
Mycroft Holmes30-Jul-13 14:20
professionalMycroft Holmes30-Jul-13 14:20 
QuestionHow to monitor and block a registry key change? Pin
turbosupramk330-Jul-13 8:07
turbosupramk330-Jul-13 8:07 
AnswerRe: How to monitor and block a registry key change? Pin
Dave Kreskowiak30-Jul-13 9:27
mveDave Kreskowiak30-Jul-13 9:27 
GeneralRe: How to monitor and block a registry key change? Pin
turbosupramk331-Jul-13 4:13
turbosupramk331-Jul-13 4:13 
GeneralRe: How to monitor and block a registry key change? Pin
Dave Kreskowiak31-Jul-13 5:58
mveDave Kreskowiak31-Jul-13 5:58 
GeneralRe: How to monitor and block a registry key change? Pin
Eddy Vluggen31-Jul-13 8:39
professionalEddy Vluggen31-Jul-13 8:39 

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.