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
665
Cancel Post From Client
posted

Ok so I'm seeing that there are many posts on this topic, and there is apparently no way to cancel a postback from the client ItemClick or ItemSelected events. Can someone tell me what the reason is for not implementing this feature? Are we using this control in a different way than intended?

I have multiple levels in my data source and I need to only post back on the child nodes. Is this not something that seems logical for this control? So if it's not possible to kill the post from the client... what is a good way to accomplish this logic?

Thanks,

Neil

Parents
  • 3726
    posted

    Hi,

    the principle is that a click event can not be canceled. All of our controls follow this and that is why a click event can not be canceled in Explorer bar. I've added a workaround in code to allow this.

    After fix 63918 is released next month, you can cancel the event the following way:

    function WebExplorerBar1_ItemClick_Client(sender, eventArgs) {
    ///<summary>
    ///
    ///</summary>
    ///<param name="sender" type="Infragistics.Web.UI.WebExplorerBar"></param>
    ///<param name="eventArgs" type="Infragistics.Web.UI.ExplorerBarEventArgs"></param>
       
      eventArgs.get_cancel = function () { return this._cancel; }

      eventArgs.set_cancel = function (val) { this._cancel = val; }
     
      eventArgs.set_cancel(true);
    }

    Thanks,

    Lubomir

Reply Children