jQuery UI Widgets Forums Scheduler editDialogCreate

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 8 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • editDialogCreate #77943

    EricK
    Participant

    Hello to all,
    The resource field is a jqxDropDownList. I have added a json source(php) to the control so I can fill the drop down list.
    This does work…
    My question is would this be the correct way of coding the control when it is created.

    editDialogCreate: function (dialog, fields, editAppointment) {
                        // hide repeat option
                        fields.repeatContainer.hide();
                        // hide status option
                        fields.statusContainer.hide();
                        // hide timeZone option
                        fields.timeZoneContainer.hide();
                        // hide color option
                        //fields.colorContainer.hide();
                        //fields.subjectLabel.html("Title");
                        //fields.locationLabel.html("Where");
                        fields.fromLabel.html("Start");
                        fields.toLabel.html("End");
                        fields.resourceLabel.html("Calendar");
                        
    		rsdataAdapter = new $.jqx.dataAdapter(rssource);
    		fields.resource.jqxDropDownList({ source: rsdataAdapter, displayMember:"name", valueMember:"id" });
                        
    },

    When I open the dialog it fills the drop down.
    (My other concern is that it calls the json (3) times.)

    editDialogCreate #77945

    Peter Stoev
    Keymaster

    Hi EricK,

    By doing that you set 3 source related properties so it will make 3 calls. Another option is to replace it with custom widget created by you, instead of using the Scheduler dialog’s built-in.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    editDialogCreate #77948

    EricK
    Participant

    Thanks for the quick feed back. I considered creating a new widget.
    If I create my own widget, how do I keep the dialog from opening.

    editDialogCreate #77950

    Peter Stoev
    Keymaster

    Hi EricK,

    The opening of the dialog is not related to whether you add or not a widget. Just make sure that you created the widget correctly, because when a javascript error occurs, the code after that error does not run.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    editDialogCreate #77951

    EricK
    Participant

    Peter,
    Let me make sure of clarity. Your stating that I should create my own widget on the dialog window or create my own dialog window with my custom widgets.

    editDialogCreate #77953

    Peter Stoev
    Keymaster

    Hi EricK,

    custom widget, but If you wish you can create custom dialog, too. You just have to disable the default one using a Scheduler property.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.