DataBindingCollection.Remove Method

Definition

Removes a DataBinding object from the DataBindingCollection collection.

Overloads

Remove(String)

Removes the DataBinding object associated with the specified property name from the DataBindingCollection collection and adds it to the RemovedBindings collection.

Remove(DataBinding)

Removes the specified DataBinding object from the DataBindingCollection collection and adds it to the RemovedBindings collection.

Remove(String, Boolean)

Removes the DataBinding object, associated with the specified property name, from the DataBindingCollection collection and controls whether to add the binding to the RemovedBindings list.

Remove(String)

Removes the DataBinding object associated with the specified property name from the DataBindingCollection collection and adds it to the RemovedBindings collection.

C#
public void Remove(string propertyName);

Parameters

propertyName
String

The property name associated with the DataBinding to be removed.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Remove(DataBinding)

Removes the specified DataBinding object from the DataBindingCollection collection and adds it to the RemovedBindings collection.

C#
public void Remove(System.Web.UI.DataBinding binding);

Parameters

binding
DataBinding

The DataBinding to be removed from the DataBindingCollection.

Examples

The following code example removes a DataBinding object from the DataBindingCollection collection by using this version of the Remove method and specifying an instance of the DataBinding class, named myDataBinding1.

C#
myDataBindingCollection1.Remove(myDataBinding1);
dataBindingOutput8 = String.Concat("The Count of the collection after DataBinding is removed is  ", myDataBindingCollection1.Count);
WriteToFile(dataBindingOutput8);

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Remove(String, Boolean)

Removes the DataBinding object, associated with the specified property name, from the DataBindingCollection collection and controls whether to add the binding to the RemovedBindings list.

C#
public void Remove(string propertyName, bool addToRemovedList);

Parameters

propertyName
String

The property associated with the DataBinding to be removed.

addToRemovedList
Boolean

A Boolean value that indicates whether to add the property name to the RemovedBindings list. true indicates that the propertyName parameter will be added to the RemovedBindings property, and false indicates that propertyName will not be added to the RemovedBindings property.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1