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

Specific multiselect in gantt edit

3 Answers 66 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
sebastien
Top achievements
Rank 1
sebastien asked on 24 May 2017, 07:25 AM

Hi,

When I edit an activity in my gantt I have many fields in the popup edit including a multiselect. This multiselect should be different for each activity.

For load the datasource I put the code below in my function Gantt edit :

<p> $.get('/Activity/ReadMultiSelectActivities?initiativeId=' + @Model.ID + '&excludeSectorId=' + $('#SectorID').val() + "&activityID=" + e.task.id, function (data, status) {<br>   allActivitiesDataSource = new kendo.data.DataSource({<br>       data: data.Data,<br>      group: { field: "SectorName" },</p><p>       sort: { field: "ActivityNumberString", dir: "asc" }<br>   });<br>});</p>

When I go the first time on my edit activity the list is empty but if I go an second time the list is OK. Then if I go on an other activity, the previous list is displayed.

It's like my list is charge after the display of my popup edit.

I try many things. Like use refresh(), data.read(), put some code in the multiselect Databound... But nothing work!

 

Do you know how to do it please?

 Thanks for advance

3 Answers, 1 is accepted

Sort by
0
sebastien
Top achievements
Rank 1
answered on 24 May 2017, 07:30 AM

Sorry, the code Does not display properly. it's better like that ;-)

$.get('/Activity/ReadMultiSelectActivities?initiativeId=' + @Model.ID + '&excludeSectorId=' + $('#SectorID').val() + "&activityID=" + e.task.id, function (data, status) {
   allActivitiesDataSource = new kendo.data.DataSource({
      data: data.Data,
      group: { field: "SectorName" },
      sort: { field: "ActivityNumberString", dir: "asc" }
   });
});
0
sebastien
Top achievements
Rank 1
answered on 24 May 2017, 01:57 PM
For information I have resolve my probelm. This is because the data are long to retrieve and so it made the setDataSource before loading the data!
0
Nencho
Telerik team
answered on 25 May 2017, 01:47 PM
Hello Sebastien,

Thank you for sharing your solution with the community.

Regards,
Nencho
Progress Telerik
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 (charts) and form elements.
Tags
Gantt
Asked by
sebastien
Top achievements
Rank 1
Answers by
sebastien
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or