Click or drag to resize
KaxMenuOnClientItemPopulationFailed Property
Gets or sets a value indicating the client-side event handler that is called when the operation for populating the children of a menu item has failed.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientItemPopulationFailed { get; set; }

Property Value

Type: String
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
Remarks

If specified, the OnClientItemPopulationFailed client-side event handler is called when the operation to populate the children of a menu item has failed. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with two properties:
    • get_item(), the instance of the menu item.
    • set_cancel(), set to true to suppress the default action (alert message).

This event can be cancelled.

Examples

<script type="text/javascript">
function onClientItemPopulationFailedHandler(sender, eventArgs)
{
var item = eventArgs.get_item();
var errorMessage = eventArgs.get_errorMessage();

alert("Error: " + errorMessage);
eventArgs.set_cancel(true);
}
</script>

<kettic:KaxMenu ID="KaxMenu1"
runat="server"
OnClientItemPopulationFailed="onClientItemPopulationFailedHandler">
....
</kettic:KaxMenu>

See Also