ASPxClientGridView.RowDblClick Event
Fires when a user double-clicks a data row.
Declaration
RowDblClick: ASPxClientEvent<ASPxClientGridViewRowClickEventHandler<ASPxClientGridView>>
Event Data
The RowDblClick event's data class is ASPxClientGridViewRowClickEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
cancel | Specifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs. |
htmlEvent | Provides access to the parameters associated with the ASPxClientGridView.RowClick event. |
visibleIndex | Gets the processed row’s visible index. Inherited from ASPxClientGridViewRowCancelEventArgs. |
Remarks
The control raises the client-side RowDblClick
event when a user double-clicks a data row.
<dx:ASPxGridView ID="ASPxGridView1" runat="server">
<%--...--%>
<ClientSideEvents RowDblClick="OnRowDblClick" />
</dx:ASPxGridView>
function OnRowDblClick(s, e) {
s.StartEditRow(e.visibleIndex);
}
Limitation
- When the Batch Edit Mode is enabled, the grid does not raise the
RowDblClick
event.
Example
The code sample below allows you to handle the RowClick and RowDblClick
events to perform custom operations on single and double row clicks.
<dx:ASPxGridView ID="ASPxGridView1" KeyFieldName="CategoryID" runat="server" AutoGenerateColumns="False">
<Columns>
<dx:GridViewDataTextColumn FieldName="CategoryID" VisibleIndex="0" ReadOnly="True" />
<dx:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1" />
<dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="2" />
</Columns>
<SettingsBehavior AllowFocusedRow="true" />
<ClientSideEvents RowClick="OnRowClick" RowDblClick="OnRowDblClick"/>
</dx:ASPxGridView>
var doProcessClick;
var visibleIndex;
function ProcessClick() {
if(doProcessClick) {
alert("Here is the RowClick action in the " + visibleIndex.toString() + "-th row");
}
}
function OnRowClick(s, e) {
doProcessClick = true;
visibleIndex = e.visibleIndex + 1;
window.setTimeout(ProcessClick, 500);
}
function OnRowDblClick(s, e) {
doProcessClick = false;
var key = s.GetRowKey(e.visibleIndex);
alert('Here is the RowDoubleClick action in a row with the Key = ' + key);
}
See Also