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
995
Remove/Cancel event handler
posted

Hello,

I would like in my codebehind to manually remove or cancel a specific event handler, UpdateCellBatch for example, how can I do that?

Also, how do I re-activate the event once it is removed?

 Thanks

Parents
No Data
Reply
  • 7694
    posted

    Hello,

    You can use the property Cancel of e to cancel the event.  Please take a look at the code below:

        protected void UltraWebGrid1_UpdateCellBatch(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            e.Cancel = true;

        }
        protected void UltraWebGrid1_UpdateCell(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e)
        {
            e.Cancel = true;
        }
    Also  Im not sure to understand  re-activation of the event  could you  please provide little bit more additional information about.

    Hope this helps.
    Thanks.

Children