Edit this page

OnCellDeselecting

Telerik.Web.UI.GridColumnEventArgs OnCellDeselecting Property

note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel.

This event is fired before a cell is deselected.

Fired by RadGrid
Arguments get_column - returns a reference to the corresponding GridColumn object get_gridDataItem - returns a reference to the corresponding GridDataItem object get_row - returns a reference to the corresponding table row element cancel - gets or sets the cancelled status of the event
Can be canceled Yes, set eventArgs.set_cancel(true) to cancel

Example:

function cellDeselecting(sender, args) {
    var selectedRow = args.get_row();
    var selectedColumn = args.get_column();
    var dataItem = args.get_gridDataItem();
    var output = String.format("The deselected cell was located in column with name: " + selectedColumn.get_uniqueName() + 
    " and in row with index: " + dataItem.get_itemIndexHierarchical() + ".");
    alert(output);
}
<ClientSettings>
        <Selecting CellSelectionMode="MultiCell" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <ClientEvents OnCellDeselecting="cellDeselecting" />
</ClientSettings>

A list of the possible options for the CellSelectionMode property could be found here.

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy