ASPxClientVerticalGridClipboardCellPastingEventArgs.oldText Property
Gets the old text of the processed cell.
Declaration
oldText: string
Property Value
Type | Description |
---|---|
string | The text of the cell. |
Remarks
The following example illustrates how to modify data before pasting to the control in the ClipboardCellPasting event handler:
Web Forms:
<dx:ASPxVerticalGrid ID="VerticalGrid" runat="server" ...>
<ClientSideEvents
ClipboardCellPasting="onClipboardCellPasting" />
<SettingsEditing Mode="Batch">
<BatchEditSettings EnableMultipleCellSelection="True" />
</SettingsEditing>
</dx:ASPxVerticalGrid>
function onClipboardCellPasting(s, e) {
if (e.cellInfo.row.fieldName == 'CategoryID') {
// your code
e.newText = e.oldText;
}
else {
e.newText += " copy";
}
}
MVC:
@Html.DevExpress().VerticalGrid(settings => {
settings.Name = "verticalGrid";
settings.ClientSideEvents.CellSelectionChanging = "function (s, e) {
if (e.cellInfo.row.fieldName == 'CategoryID') {
// your code
e.newText = e.oldText;
}
else {
e.newText += " copy";
}
}";
settings.Rows.Add("CategoryID");
...
}).Bind(Model).GetHtml()
See Also