Version

Row Deleting Overview (WebDataGrid)

Topic Overview

Purpose

This topic provides an overview of the WebDataGrid Row Deleting behavior’s features and functionality.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic describes how behaviors work in the WebDataGrid .

This topic provides a conceptual overview of the Editing feature (EditingCore behavior) of the WebDataGrid .

Introduction

Row Deleting summary

The Row Deleting behavior provides deleting functionality for the WebDataGrid . As with all behaviors, the required client-side HTML and JavaScript are only rendered when the behavior is enabled. By default, rows are deleted by selecting a row and using the delete key. As such, you must include the Selection behavior for the grid and also set RowSelectType to be different than the default value - None. There is an option to enable a delete button to provide a more explicit user interface.

Row Deleting Overview (WebDataGrid) 1.png

Main Features

Main features summary chart

The following table summarizes the main features of the WebDataGrid Row Deleting behavior.

Feature Description

Deleting with the keyboard

By default, the Row Deleting behavior provides keyboard support when the user clicks the delete key.

Delete Button

When enabled, the delete button displays when the mouse hovers over a row providing a discoverable user interface to delete a row.

User Interactions and Usability

User interactions summary chart

The following table summarizes the user interaction capabilities of the WebDataGrid Row Deleting behavior.

The user can… Using… Details Configurable?

Delete a row

The Delete key

The Delete button on mouse hover

When the Row Deleting behavior is enabled along with the Selection behavior, the user can select a row and press the Delete key to delete the selected row.

workaround.png

The Delete button is enabled using the Row Deleting behavior’s ShowDeleteButton property.

Row Deleting Behavior Events

Row deleting behavior events reference

The Row Deleting behavior has the following client-side events used to customize client-side functionality.

Event Description

DeleteButtonDisplaying

Fires prior to the Delete button displaying when the mouse hovers over a row. The event applies only when the Delete button is enabled. It is cancellable.

DeleteButtonDisplayed

Fires after the Delete button displays as a result of hovering the mouse over a row. The event applies only when the Delete button is enabled.

DeleteButtonHidden

Fires after the Delete button hides when the mouse hovers off a row. The event applies only when the Delete button is enabled.

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic details how to enable the Row Deleting behavior in the WebDataGrid .

Samples

The following samples provide additional information related to this topic.

Sample Purpose

The WebDataGrid includes a delete row behavior that allows an end user to remove one or more rows of data from the bound data source. This sample shows how to setup the behavior so when the user clicks on the delete icon the current row is deleted from the bound data source.

The WebDataGrid includes a delete row behavior that allows an end user to remove one or more rows of data from the bound data source. This sample shows how to interact with the server events of the behavior.

This sample demonstrates enabling the Delete button in the WebDataGrid .

You can customize the appearance of the Row Deleting behavior using the Row Deleting properties. Furthermore, you can use the DeleteButtonDisplaying event to prevent the button from appearing.