RadCalendar for ASP.NET AJAX

RadControls for ASP.NET AJAX

The OnRowHeaderClick client-side event handler is called when the user is about to select a row of dates by clicking on a row header. The event occurs only if the ShowRowHeaders and UseRowHeadersAsSelectors properties are set to true.

Note

The OnRowHeaderClick event is supported by: RadCalendar.

Two parameters are passed to the event handler:

  • sender is the calendar control.

  • eventArgs has the following properties:

    • get_index() returns the 1-based index of the row that was clicked.

    • get_domElement() returns the DOM element for the row header that was clicked.

    • set_cancel() lets you prevent the click from selecting the row of dates.

The following example uses the OnRowHeaderClick event to confirm the selection:

CopyASPX
<script type="text/javascript">
    function ConfirmRowSelection(sender, eventArgs) {
        var msg = "Do you want to change the selection for row " + eventArgs.get_index();
        var title = eventArgs.get_domElement().title;
        if (title != "")
            msg = msg + " (" + title + ")";
        msg = msg + "?";
        eventArgs.set_cancel(!confirm(msg));
    }
</script>
<telerik:RadCalendar ID="RadCalendar1" runat="server">
    <ClientEvents OnRowHeaderClick="ConfirmRowSelection" />
</telerik:RadCalendar>

See Also