How to cancel DialogOpen in Syncfusion Essential JS 2 Kanban

Answered
0
0

Hello,

 

This is kinda a continuation of my last question, but more specific. ( https://wisej.com/support/question/how-to-control-syncfusion-essential-js-2-controls-with-more-detail#sabai-entity-content-13611 )

The general events work fine. Now I’m trying to cancel the dialogOpen Event, because this is the only way of disabling opening the dialogBox from the Control itself. In Javascript this looks like this (it’s part of the example here https://ej2.syncfusion.com/javascript/documentation/kanban/dialog/ ):

 

var kanbanObj = new ej.kanban.Kanban({
    (...)
    dialogOpen: 'dialogOpen'
});
function dialogOpen(args) {
    args.cancel = true;
}

 

And this doesn’t work in C#.

            (...)
            this.kanban1.Instance.onDialogOpen += new WidgetEventHandler(kanban1_onDialogOpen);
        }
        private void kanban1_onDialogOpen(object sender, WidgetEventArgs e)
        {
            e.Data.cancel = true;
        }

The event handler seems to hit, if I put a breakpoint there, but it looks like the dialog is already open and the cancel does nothing.

 

  • You must to post comments
Good Answer
0
0

You have to handle it in a javascript event handler. You cannot handle synchronous events on the server.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.