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

Loose custom javascript after expand/collapse

5 Answers 104 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Druoton
Top achievements
Rank 1
Druoton asked on 27 Jul 2016, 10:15 AM

Hello Telerik team,

 

I bound dblclick events on each tasks of my radgantt. This binding is made in the PageLoad function of the .aspx page which contains the radgantt.

This event allow the user to display a custom popup rather than the default one.

 

But I noticed that the execution don't go in my custom JavaScript code (and don't throw the dblclick event or anything else) as soon as I click on the expand/collapse button on a task.

 

I need that the execution go in my custom JavaScript code even if I click on the expand/collapse buttons.

Is it possible ?

 

Thanks in advance,

Best reagrds

5 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 01 Aug 2016, 10:02 AM
Hello Druoton,

I am afraid that this is a custom and not supported scenario. Nevertheless, I would suggest you try subscribing to the click event of the expand/collapse button and manually fire the double click event.

Regards,
Peter Milchev
Telerik by Progress
0
Serol
Top achievements
Rank 1
answered on 03 Feb 2017, 11:22 AM

hi,

We are stuck on the same scenario,  after expand/collapse a parent task, below tasks dblclick opens default edit popup.

Are there any improvements on that matter?

if not, will you please provide us a sample for subscribing to the click event of the expand/collapse button?

 

Thanks in advance

0
Peter Milchev
Telerik team
answered on 03 Feb 2017, 04:41 PM
Hello,

Here is a sample implementation that logs in the console every time a collapse/expand handle is clicked: 

$telerik.$('.RadGantt .rgtTreelistContent.radGridContent')
    .on('click',
    '.radIcon.radIconExpand, .radIcon.radIconCollapse',
    function () {
        console.log('handle clicked')
    });

More information on the event subscription could be found here: jQuery .on( events [, selector ] [, data ], handler).

Regards,
Peter Milchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Serol
Top achievements
Rank 1
answered on 05 Feb 2017, 12:41 PM
Thank you for your help
0
bassam
Top achievements
Rank 1
Veteran
answered on 29 Mar 2020, 06:07 PM

 

Hello,
I am using RadGantt in my project and facing  have some points that I need you help and support:

1. What is the attribute that distinguish between adding  child task and parent task in the RADGANTT code?
2. I could not find an event such as onclick() , is there any way to handle this?
3. How to change the icon of the collapse/Expand in the radGantt?
4. Hot to change the color of the task in the RadGantt?
5. How to disable/Enable the Radgantt ?

I am a developer, below  is the email which was the tool registered with

Tags
Gantt
Asked by
Druoton
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Serol
Top achievements
Rank 1
bassam
Top achievements
Rank 1
Veteran
Share this question
or