The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
i have successfully validated all user keypress by using the Grid_CurrentCellValidateString event, but that doesn''t stop someone from copying and pasting a bad value into the cell. Is there anyone please to validate this paste operation or do i have to put this code in the Grid_CurrentCellValidating event . .
-ak
ADAdministrator Syncfusion Team December 17, 2005 10:02 AM UTC
If you are pasting text (for example, this is always the case in a GridDataBoundGrid or is the case when you in a GridControl when you copy from another object like an Excel spreadsheet), then you can use the grid.Model.PasteCellText event to validate the text being pasted.
But if you are copy from a GridControl and paste in a GridControl, then by default style objects are copied and pasted, and PasteCellText is not raised. In this case, you can either turn off support for copying styles (allowing only text to be pasted and PasteCellText to be hit) or you can handle the grid.ClipboardPaste. In ClipboardPaste, you would have to get the GridData object from the clipboard, validate it somehow. Working with PasteCellText is much simpler as it provides the proposed text cell by cell. To turn off style copy/paste support in a gridcontrol, turn off this flag.
this.gridControl1.Model.CutPaste.ClipboardFlags &= ~GridDragDropFlags.Styles;