Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
How can I cancel the "ondemandload" event on javascript function "demandLoad(treeID, nodeID)"
posted

Hi friends:

    How can I cancel the Event (ondemandload="UltraWebTree1_DemandLoad"  that is in server site) in javascript funcion ""demandLoad(treeID, nodeID)"(treeID, nodeID)" .

   If the "demandLoad(treeID, nodeID)"function has the property like " oEvent.Cancel = true ".

If someone Know the answer, please tell me,

Thank you very much!

  • 28464
    posted

    Hello,

    Cancelling a client-side in UltraWebTree is a little bit counter intuitive indeed - you typically cancel an event by returning true from the event handler. You can take a look at the list of client events for UltraWebTree here:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/WebTree_Client_Side_Events_CSOM.html

    and take a look at the text at the top:

    <quote>

    Note: Most of these client-side events are cancelable. The most significant of which are the Before events. To cancel an event, return true in the event handler. For cases in which a Before event has a corresponding server-side event handled, returning true in the client-side event also cancels the postback to trigger the server-side event.

    </quote>

    Event though DemandLoad does not start with Before... I have just taken a look at our source code and verified that returning true from the DemandLoad client side event handler will indeed cancel the server event.