Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #111760
    derekbackus
    Participant

    How do I call preventDefault() in Blazor?

    Here’s my ItemChanging event. This causes the runtime error “Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: ‘Cannot invoke a non-delegate type'”.

    private void ItemChanging(Smart.Blazor.Event eventObj)
    {
    eventObj[“preventDefault”]();
    }

    #111764
    admin
    Keymaster

    Hi,

    I suppose you will need to use Javascript and JSInterop if you want to preventDefault and event. In Blazor with .NET code using the eventObj it cannot happen.

    Regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.