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

gantt data source filtered by date focuses on first interval date

3 Answers 13 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Vedad
Top achievements
Rank 1
Iron
Veteran
Iron
Vedad asked on 14 May 2020, 05:34 PM

Hi,

I implemented datasource filtering on my gantt (for jquery) widget which includes filtering of elements by start and end date. In terms of filtering logic, everything works fine, but this introduced interesting behaviour with my gantt. After any action (update of tasks via drag-n-drop for example), gantt is focused to the beginning of filter interval. 

I did some debugging and I came to piece of code in kendo library (displayed below) which seems to be cause of the problem.

Is there any way to prevent this focusing, because it doesn't make much sense to scroll there if i change task somewhere in the middle of range.

Thank you

_render: function (tasks) {
    var view = this.view();
    var range = this._range(tasks);
    var date = view.options.date;
    this._tasks = tasks;
    view.range(range);
    view.renderLayout();
    view.render(tasks);
    if (date) {
        view._scrollToDate(date);
    }

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 18 May 2020, 10:11 AM

Hi Vedad,

As the described behavior is a side effect from the filtering implemented I will need some more details about that in order to properly evaluate the case.Can you provide a simple code example of the filtering functionality you have and when the filtering happens? 

Regards,
Ianko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Vedad
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 18 May 2020, 11:30 AM

Hi Ianko, 

Thanks for the prompt response. I will try to make a dojo and reproduce it there. 

Thanks a lot.

0
Ianko
Telerik team
answered on 19 May 2020, 06:07 AM

Hello Vedad,

I am looking forward to the dojo example. 

Regards,
Ianko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Gantt
Asked by
Vedad
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Ianko
Telerik team
Vedad
Top achievements
Rank 1
Iron
Veteran
Iron
Share this question
or