Click here to Skip to main content
15,922,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Close Form Pin
nlarson117-Nov-07 4:47
nlarson117-Nov-07 4:47 
QuestionNetwork [modified] Pin
Bismark Appah6-Nov-07 23:27
Bismark Appah6-Nov-07 23:27 
AnswerRe: Network Pin
Christian Graus7-Nov-07 0:28
protectorChristian Graus7-Nov-07 0:28 
AnswerRe: Network Pin
Steven J Jowett7-Nov-07 3:50
Steven J Jowett7-Nov-07 3:50 
Questioncheck parent when child is checked in treeview Pin
eyes20076-Nov-07 23:12
eyes20076-Nov-07 23:12 
AnswerRe: check parent when child is checked in treeview Pin
Tom Deketelaere7-Nov-07 1:27
professionalTom Deketelaere7-Nov-07 1:27 
GeneralRe: check parent when child is checked in treeview Pin
eyes20077-Nov-07 2:41
eyes20077-Nov-07 2:41 
GeneralRe: check parent when child is checked in treeview Pin
Tom Deketelaere7-Nov-07 20:59
professionalTom Deketelaere7-Nov-07 20:59 
eyes2007 wrote:
what i have done

1. when a parent node is checked, all of its child nodes is checked.
2. when a parent node is unchecked, all of its child nodes is unchecked.
3. checks and unchecks all the parent nodes and child nodes with the help of buttons.

all these things are using some sort of recursive function and thats cause the problem. i use all that in aftercheck event of treeview


So you were able to do those 3 things?

eyes2007 wrote:
the problem is
1. when all child and parent nodes are unchecked, then , when child node is checked then i need to also check its parent node. thats exactly what i want to do.


to do this you will need to 'override' the aftercheck event of the treeview otherwise it's going to cause problems as you already noticed.

the easyst way to do this is with a boolean. when the aftercheck event is fired check if its a child node or not if so put boolean to false and check the parent after this you put the boolean back to true.
and then as first check in the aftercheck event you check this boolean if its false you do nothing else you do the code needed.
this is probably not the best way to do this but it should work and that's how I would start and see where it gets me.


if you have problems with implementing this post the code (or part of the code) in the aftercheck event that way I can have a better picture of what you are doing and what is going on.

hope this helps

If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistakes.

Questiontext box issue Pin
Tauseef A6-Nov-07 22:59
Tauseef A6-Nov-07 22:59 
AnswerRe: text box issue Pin
Colin Angus Mackay6-Nov-07 23:07
Colin Angus Mackay6-Nov-07 23:07 
QuestionRe: text box issue Pin
Tauseef A6-Nov-07 23:21
Tauseef A6-Nov-07 23:21 
AnswerRe: text box issue Pin
Colin Angus Mackay7-Nov-07 0:08
Colin Angus Mackay7-Nov-07 0:08 
QuestionRe: text box issue Pin
Tauseef A7-Nov-07 1:09
Tauseef A7-Nov-07 1:09 
AnswerRe: text box issue Pin
Luc Pattyn7-Nov-07 1:55
sitebuilderLuc Pattyn7-Nov-07 1:55 
Questiontext box issue Pin
Tauseef A6-Nov-07 22:58
Tauseef A6-Nov-07 22:58 
AnswerRe: text box issue Pin
Paul Conrad7-Nov-07 13:20
professionalPaul Conrad7-Nov-07 13:20 
QuestionDropdownlist index change event problem. Pin
Thanigaimani836-Nov-07 22:22
Thanigaimani836-Nov-07 22:22 
AnswerRe: Dropdownlist index change event problem. Pin
AliAmjad6-Nov-07 22:36
AliAmjad6-Nov-07 22:36 
Questionconnecting to a ISP hosted database via vb.net Pin
tj286-Nov-07 19:26
tj286-Nov-07 19:26 
AnswerRe: connecting to a ISP hosted database via vb.net Pin
Craster7-Nov-07 1:45
Craster7-Nov-07 1:45 
GeneralRe: connecting to a ISP hosted database via vb.net Pin
tj287-Nov-07 20:33
tj287-Nov-07 20:33 
Questionselected value property in listbox control Pin
yogesh_kumar_agarwal6-Nov-07 18:39
yogesh_kumar_agarwal6-Nov-07 18:39 
QuestionHow to maintain the items in combobox Pin
VB 8.06-Nov-07 17:51
VB 8.06-Nov-07 17:51 
AnswerRe: How to maintain the items in combobox Pin
Andy_L_J6-Nov-07 20:17
Andy_L_J6-Nov-07 20:17 
GeneralRe: How to maintain the items in combobox Pin
VB 8.07-Nov-07 0:29
VB 8.07-Nov-07 0:29 

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.