jQuery dialog resize event

The dialog is a special type of window, which can has a toolbar on top and a button bar on bottom. The dialog has only one close tool display on top right of header by default. Users can configure dialog behaviors to display other tools such as collapsible, minimizable, maximizable tool, etc.
I have a requiremnt in my project to providethe resizing option for the dialogbox. Pasting the code here
Dialogs Extend from $.fn.window.defaults. Override defaults with $.fn.dialog.defaults.

    function LoadIDTMeetingSummariesPopup() {
        $('#MeetingsSummariesDlg').dialog(
                            {
                                title: "Meeting Summaries",
                                resizable: true,
                                modal: false,
                                draggable: true,
                                height: 'auto',
                                width: 'auto',

                            });
    } 
    $('#MeetingsSummariesDlg').bind("dialogresize", function(event, ui) {
        $('#MeetingsSummariesDlg #resizeToParent').css('height',  ($('#MeetingsSummariesDlg').height() - 40) + 'px');
        $("#gridIdtMeetingsSummaries").setGridWidth($('#MeetingsSummariesDlg').width() - 40);
        $("#gridIdtMeetingsSummaries").setGridHeight($('#MeetingsSummariesDlg').height() - 120);//div has a JQGrid and I am resizing them
    });

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s