Specific multiselect in gantt edit

4 posts, 0 answers
  1. sebastien
    sebastien avatar
    3 posts
    Member since:
    Jun 2008

    Posted 24 May Link to this post

    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

  2. sebastien
    sebastien avatar
    3 posts
    Member since:
    Jun 2008

    Posted 24 May in reply to sebastien Link to this post

    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" }
       });
    });
  3. sebastien
    sebastien avatar
    3 posts
    Member since:
    Jun 2008

    Posted 24 May Link to this post

    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!
  4. Nencho
    Admin
    Nencho avatar
    1671 posts

    Posted 25 May Link to this post

    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 visualization (charts) and form elements.
Back to Top