'Alertify return true or false

I have .Net button with an onClientClick which calls:

 function alertGrid() {
       var result = confirm("Are you sure you want to clear all program data?");
       if (result)
           return true;
       else
           return false;
    }

Works fine, but how to I convert this to use an Alertify confirm? For the life of me I cannot figure it out.

Cheers!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source