Click or drag to resize

ControllerStandardDataItemClassIndexOnActionResultPostDelete Method

Data item is deleting via option IndexItemDeleteViaDialog. Trigger event IndexAppActionDelete details see topic Remarks.

Namespace:  SOWIWeb.Helper
Assembly:  SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
protected virtual ActionResult IndexOnActionResultPostDelete()

Return Value

Type: ActionResult

[Missing <returns> documentation for "M:SOWIWeb.Helper.ControllerStandard`1.IndexOnActionResultPostDelete"]

Remarks
Trigger event IndexAppActionDelete. Can be cancled standard App method Delete (e.Cancel true or false)

Delete ID is form field DeleteID (Request.Form["DeleteID"])

Examples
This example handling the event IndexAppActionDelete

Declaration the event handler

public TicketFileContentController() : base()
{
    this.IndexAppActionDelete += OnIndexAppActionDelete;
}
Event of IndexAppActionDelete
/// <summary>
/// Delete ID is FileContent ID not TicketFileContent ID and not is running standard App method Delete
/// </summary>
/// <param name="sender"></param>
/// <param name="e">e.Value is ID to delete</param>
private void OnIndexAppActionDelete(object sender, EventArgPropertyData e)
{
    //* DeleteID (e.Value) is FileContent.ID (not TicketFileContent ID) *
    int lID = (int)e.Value;
    AppTicketFileContent.DeleteByFileContent(lID);
    e.Cancel = true;    //* standard App method Delete not is running *
}
See Also