This is a migrated thread and some comments may be shown as answers.

show throw exception in UI from CustomProvider

1 Answer 67 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
farshid
Top achievements
Rank 1
farshid asked on 20 Feb 2016, 08:39 AM

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.

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 24 Feb 2016, 08:36 AM
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
Tags
Gantt
Asked by
farshid
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or