Home - Forums-.NET - FlyTreeView (ASP.NET) - cancelling postback from client nodeEventHandler

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

cancelling postback from client nodeEventHandler
Link Posted: 29-Aug-2007 04:35
Hi folks !
I need to prevent my tree from postbacking on a checkbox (un)checked event (triggers the item selection changing). In fact i just need the checked/unchecked item evaluation for an ulterior event (nodemoved, for multi item move following the dragged item)
You can prevent an item selection from (un)checking, but not the inverse way.
The nodeEventHandler seems not to permit the cancelling of the following postback, even when returning false when eventType = '(un)checked'
I may use the clientside selectednodechange event to cancel the selectionchange (returning false), but how can i detect that this event was triggered by a simple (un)checking click ?
If I succeed avoiding postback, will the item server side property 'checked' be up to date when i will use it in my nodemoved server event ?  

Has anyone already implemented such a functionality ?
Link Posted: 29-Aug-2007 05:15
I think, what you can do is to disable autopostback, but instead force postback in cases you need it:

function nodeEventHandler(treeview, node, eventType)
{
    if (_define condition here_)
    {
         treeview.postBack();
    }
}
Link Posted: 29-Aug-2007 23:03
I didn't succeed this way. Maybe I can prevent postbacking on checked event, but it still triggers the selected event, whose postback I need to keep on other circumstances and can't disable

In fact, I think I have found the purpose of EnableFullRowEvents=\"false\"
  

thanks