show throw exception in UI from CustomProvider

2 posts, 0 answers
  1. farshid
    farshid avatar
    1 posts
    Member since:
    Feb 2016

    Posted 20 Feb Link to this post

    Hi

    I use gantt chart viewer in my company project.

    it's realy perfect but i have some problem with custom provider

    i want show a message in UI when something is wrong is customProvider
    for example use delete a dependency but in deleteDependency function ,we understand use haven't dependency delete permittion and we throw a exception.

    but in UI, dependency line is deleted.

    we want show dependency line in UI if delete function return throw exception and show a message to user contain throw message.

  2. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 24 Feb Link to this post

    Hello,

    You can use the following code to prevent the UI from changing and alert when a server exception is thrown:
    function pageLoad() {
        $find("RadGantt1")._widget.dependencies.bind("error", function(e) {
            if (e.errors !== false) {
                this.cancelChanges();
     
                alert("Error");
            }
        })
    }


    Regards,
    Bozhidar
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top