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 want to set the max number of columns in the grid to 10, which I do in properties, at design time. However, if the user pastes some data with more than 10 columns, additional columns are added to the grid. How can I prevent this from happening? I would rather that the data from extra columns was not recorded at all or an error was given.
Thank you.
ADAdministrator Syncfusion Team November 19, 2004 10:08 PM UTC
There is a property flag that controls whether or not rows/columns can be appended during a paste.
//C#
this.gridControl1.CutPaste.ClipboardFlags |= (GridDragDropFlags.NoAppendCols | GridDragDropFlags.NoAppendRows);
''VB.NET
Me.GridControl1.Model.CutPaste.ClipboardFlags = Me.GridControl1.Model.CutPaste.ClipboardFlags _
Or GridDragDropFlags.NoAppendRows _
Or GridDragDropFlags.NoAppendCols