Version

Get the Selected Activity on the Client Side

WebDayView™ and WebMonthView™ all have a method called getSelectedActivity off them client-side that can be used to get access to the selected Activity . This can be used when deleting or updating an activity client-side.

The code snippet below shows this method being used. Notice the testing to make sure that an activity is selected to avoid null errors.

In JavaScript:

function GetSelectedActivity()
{
	var webDayView = ig_getWebControlById("WebDayView1");
	var activity = webDayView.getSelectedActivity();
	if(activity != null)
		alert(activity.getSubject());
	else
		alert("You must select an Activity first");
}