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

[Solved] Selecting a Date and it pops up a Window

1 Answer 24 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 01 Dec 2011, 04:25 PM
Another question I'm trying to figure out is ...

If I want the selection of a date to invoke a Window Control and show information...

Is there a ClientEvents or some other event firing that I can utilize to do this?

Thanks,
David

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 02 Dec 2011, 03:19 PM
Found the solution.

I defined an OnChange Client Event for the Calendar like so

 function Calendar_OnChange(e)
        {
            datestr = formatDate(e.date);
            var window = getWindow();
            $.ajax({
                url: 'LoadContent',
                type: 'GET',
                data: "date=" + datestr,
                success: function (result) {
                    // process the results from the controller
                    showPopup();
                    $('#EventWindow').data('tWindow').content(result);
                },
                error: function () {
                    $('#EventWindow').data('tWindow').content('Error Occured');
                }
            });
        }

the Action to 'LoadContent' retrieves what I need and returns it using Ajax to this script where I then use jQuery to change the div tag to show my content on the Telerik Window.

Works well.

Tags
Calendar
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or