We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeView and too many events?

Thread ID:

Created:

Updated:

Platform:

Replies:

11487 Mar 8,2004 06:50 PM UTC Mar 10,2004 02:14 PM UTC WinForms 8
loading
Tags: Tools
Matthew Brohn
Asked On March 8, 2004 06:50 PM UTC

I am using the TreeView with "interactive checkboxes. When I check a child node, the parent node will be also be set or partially set. This is working great! However, if I check a child node, I am getting the AfterCheck event multiple times. I really only need it once. The problem is that I need to create a complex query based on the state of the tree. I do not want to do this many times as it only needs to be done once. Cheers, -M

Administrator [Syncfusion]
Replied On March 8, 2004 09:20 PM UTC

Hi, I have tested for this issue in our latest release and the AfterCheck event seems to work fine here. It gets fired only once in response to a node being checked (child or parent). Please let me know the version of Essential Suite that you are using. Thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Matthew Brohn
Replied On March 9, 2004 11:11 AM UTC

Hmm.. it definitely doesnt work that way here. I am using TreeViewAdv 2.0.2.1. I have a sample I can email you but essential all that is to it is: 1) One Parent node and One Child node 2) Interactive and ShowCheckboxes = true 3) AfterSelect event -When I select the child I get 3 calls to the AferSelect method If you want my project let me know how to get it to you otherwise try the above steps and see if you can repro with them.. Cheers, -M

Administrator [Syncfusion]
Replied On March 9, 2004 12:25 PM UTC

Hi, Thanks for the additional information.I could observe this issue here, and have notified the development team in this regard. I will update you as soon as they get back to me. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.

John Freeborg
Replied On March 9, 2004 06:54 PM UTC

We are using the 2.0.2.1 beta Actually the more we investigate, the behavior of the AfterCheck events seems to be what I would expect. However, our situation is that we want to do something expensive in terms of cpu time, but only after all the AfterCheck events have been dispatched and the tree has "settled" down. With the tree in interactive mode however, single operations by the user could result in 1 or many AfterCheck events so we don''t really know when the TreeViewAdv control is "done" with them. I guess we could put some lazy timer in, but that seems fragile and non-optimal. We''ve looked at the other events the TreeViewAdv class dispatches, but nothing seems obvious to us and we''ve tried hooking a few and they didn''t do what we want. Sort of a "AfterInteractiveChecks" event is what we seem to be looking for. Ideas? Thanks.

Administrator [Syncfusion]
Replied On March 9, 2004 07:11 PM UTC

Hi, The reason behind the AfterCheck event being fired thrice is explained below : The nodes have the InteractiveCheckBox property set which will adjust the parent''s property when the child''s check state is changed, and the child''s CheckState when the parent''s check state is changed. That accounts for 2 of the 3 events fired. The third event fired is because the root node''s check state is also updated when the top-most node''s check state is changed. However we find this unnecessary and hence have modified the source code accordingly to eliminate the evnt from firing for the third time. We appreciate your feedback, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

John Freeborg
Replied On March 9, 2004 08:08 PM UTC

I understand your response. However, it doesn''t seem to address anything in my last post. Is there some event we can listen for that will fire when the tree view is done firing _all_ the AfterCheck events as a result of some user interaction (either by mouse or keyboard)? For us the whole tree represents the parameters that we will use to go off and perform a time consuming operation. After the user changes a check state, we need to know when the tree "settles down" so we can walk the state of the whole tree and then go off and do our expensive operation. At the moment we end up kicking off expensive operations for _every_ AfterCheck and that isn''t what we want. But creating a timer in the AfterCheck handler that when expired says "hmmm...guess that must have been the last AfterCheck event we might be getting because 500 millis went by" or something doesn''t seem like a great solution. Is this clear? Maybe I''m not describing this well enough. Thanks.

Administrator [Syncfusion]
Replied On March 10, 2004 01:25 PM UTC

Hi, Our apologies for having not understood your requirements correctly earlier. We have considered your suggestion for a AfterInteractiveChecks event as a feature request, and this has been internally implemented now. This feature will be available in the next release of Essential Suite. We appreciate your feedback, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

John Freeborg
Replied On March 10, 2004 02:14 PM UTC

Thank you very much!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;