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

Select a task via code

1 Answer 88 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Colin
Top achievements
Rank 1
Colin asked on 10 Apr 2017, 11:34 AM

I am using my own pop-up dialog window for adding/editing tasks in the Gantt display.  Saving from this dialog causes a postback to the server and a redraw of the gantt chart.  I need to programmatically re-select the last task added/edited  (either server side or client side but preferably server side).

Is there anyway to achieve this?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Colin
Top achievements
Rank 1
answered on 10 Apr 2017, 03:23 PM

Managed to get this working client side by accessing the Kendo widget part of the Gantt control.  Here's the code:

function selectTask(tsk){

            var gantt = $find("<%= radGantt.ClientID%>");
            gantt._widget.select("tr:eq(" + tsk.get_id() + ")");
        }

Tags
Gantt
Asked by
Colin
Top achievements
Rank 1
Answers by
Colin
Top achievements
Rank 1
Share this question
or