Version

Removing a Behavior

You can remove a behavior from the Behaviors collection in order to disable it. If a behavior has dependent behaviors when you remove it, you will remove those dependent behaviors as well. You can also disable the behavior without removing it by setting its Enabled property to False.

At design time bring up the Behaviors Editor dialog and uncheck the behavior you want to remove.

The code below shows you how to remove the Pager behavior from WebDataGrid™. The Paging property is used to reference the behavior. This is the same process as removing any other behavior. For the full list of behaviors, see Adding a Behavior at Runtime.

In Visual Basic:

Me.WebDataGrid1.Behaviors.Remove(Me.WebDataGrid1.Behaviors.Paging)

In C#:

this.WebDataGrid1.Behaviors.Remove(this.WebDataGrid1.Behaviors.Paging);