Skip to main content
All docs
V23.2

ASPxClientGridViewClipboardCellPastingEventArgs.newValue Property

Specifies the new value of the processed cell.

Declaration

newValue: string

Property Value

Type Description
string

The value of the cell.

Remarks

The following example illustrates how to modify data before pasting to the control in the ClipboardCellPasting event handler:

DevExpress GridView - Copy and paste multiple cells

Web Forms:

<dx:ASPxGridView ID="GridView" runat="server" ...>
    <ClientSideEvents 
        ClipboardCellPasting="onClipboardCellPasting" />
    <SettingsEditing Mode="Batch">
        <BatchEditSettings EnableMultipleCellSelection="True" />
    </SettingsEditing>
</dx:ASPxGridView>
function onClipboardCellPasting(s, e) {
    if (e.cellInfo.column.fieldName == 'CategoryID') {
        // your code
        e.newValue = e.oldValue;
    }
}

MVC:

@Html.DevExpress().GridView(settings => {
    settings.Name = "grid";
    settings.ClientSideEvents.CellSelectionChanging = "function (s, e) { 
        if (e.cellInfo.column.fieldName == 'CategoryID') {
            // your code
            e.newValue = e.oldValue;
        }
    }"; 
    settings.Columns.Add("CategoryID");
    ...
}).Bind(Model).GetHtml()
See Also