jQuery UI Widgets Forums Scheduler set selected resource in edit-dialog dropdown

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 1 week, 5 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • DeployDuck
    Participant

    Hello,
    I want to SHOW multiple resources in the scheduler but the user should only be able to add / edit appointments with own resource. Therefore I have used fields.resourceContainer.hide(); to hide the resources dropdown.

    My question is: how to set the resource dropdown selected item, so it correctly displays in the scheduler?

    Thanks.
    DeployDuck


    DeployDuck
    Participant

    Meanwhile I’m able to set the selected resource for the FIRST TIME on create in editDialogCreate: function (dialog, fields, editAppointment) with:

    `let MyCalenderResourceName = MyScheduler.source.db.localdata.find(x => x.ResourceID ===My.Sid.I).CalenderOf;
    $(fields.resource[0]).jqxDropDownList(‘selectItem’, MyCalenderResourceName );`

    But if I do the same in editDialogOpen: function (dialog, fields, editAppointment) it dosn’t work.

    Any suggestions?

    Thanks.


    DeployDuck
    Participant

    Ok. found a solution: You have to use an $('#MySchedulerID').on('editDialogOpen', function (event){...
    to set the resource selected item. Seems that the editDialogOpen: function is an non working software-artefact.


    Hristo
    Participant

    Hello DeployDuck,

    I tested this example and it seems to work fine:
    https://jseditor.io/?key=jqxscheduler-events
    Could you clarify it about the editDialogOpen event?
    It will be better if you could provide us with a simple example.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.