This event is fired after a data item has been deleted from the C1 CMS data store. See Delete<(Of <<'(TData>)>>)(TData)

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public static event DataEventHandler OnDeleted
Visual Basic
Public Shared Event OnDeleted As DataEventHandler
Visual C++
public:
static  event DataEventHandler^ OnDeleted {
	void add (DataEventHandler^ value);
	void remove (DataEventHandler^ value);
}

Examples

CopyC#
void MyMethod()
{
   DataEvents<IMyDataType>.OnDeleted+= new DataEventHandler(DataEvents_OnDeleted);

   using (DataConnection connection = new DataConnection())
   {
      IMyDataType myDataType = 
         (from item in connection.get<IMyDataType>()
          where item.Id == 1
          select item).First();

      connection.Delete<IMyDataType>(myDataType); // This will fire the event!
   }
}


void DataEvents_OnDeleted(object sender, DataEventArgs dataEventArgs)
{        
}

See Also