onBeforeSelect Event

Description

Fires before the onSelect event.

Discussion

The onBeforeSelect event can be used to prevent the user from selecting a row in the List control. If the event returns false, the user is prevented from selecting another row in the List. You can get the zero based index of the row the user is trying to select by referring to arguments[0] in your code.

Example

var row = arguments[0];
if (row % 2 == 0) {
	alert("You cannot select even rows.");
	return false;
}

See Also