We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Gantt escape key

Thread ID:

Created:

Updated:

Platform:

Replies:

140968 Nov 16,2018 09:23 AM UTC Nov 20,2018 08:54 AM UTC JavaScript 3
loading
Tags: ejGantt
Tomasz Tomczykiewicz
Asked On November 16, 2018 09:23 AM UTC

Hello,

I have a problem with Gantt. When I add a new row (see the first attachment) and I press the escape key then a new row appears (see the second attachment). I want to disappear the new row when I press the escape key.

Best regards,
Tomasz Tomczykiewicz

Attachment: gantt_2370d0ec.zip

Jesus Arockia Sankaran S [Syncfusion]
Replied On November 19, 2018 11:59 AM UTC

Hi Tomasz, 
 
Thank you for contacting Syncfusion support. 
 
We have analyzed your requirement and we can achieve your requirement by deleting the record by using deleteItem public method and manually handling the escape key function with sample level. Please refer the below code example for this 
 
<script type="text/javascript"> 
var isAdding = false; 
  $(function () { 
            $("#GanttContainer").ejGantt({ 
                 dataSource: projectData, 
                 endEdit: function (args) { 
                     isAdding = false; 
                     alert(args.rowIndex); 
 
                }, 
                  //.. 
           }); 
    }); 
     $(document).keyup(function (e) { 
        if (e.keyCode == 27 && isAdding) { 
            var obj = $("#GanttContainer").data("ejGantt"); 
                obj.deleteItem(); 
                isAdding = false; 
            }        }) 
</script> 
 
We have prepared the sample for your reference, please find the sample link below 
 
 
Please get back to us if you require any further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 


Tomasz Tomczykiewicz
Replied On November 19, 2018 04:08 PM UTC

Hi Jesus,

Thanks, it solved my problem.

Best regards,
Tomasz Tomczykiewicz

Jesus Arockia Sankaran S [Syncfusion]
Replied On November 20, 2018 08:54 AM UTC

Hi Tomasz,  
  
Thanks for your update.  
  
Please get back to us if you require any further assistance on this.  
  
Regards,  
Jesus Arockia Sankaran S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;