Completed
Last Updated: 19 Aug 2014 13:47 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 18 Aug 2014 13:40
Category: GridView
Type: Bug Report
0
FIX. RadGridView - Paste functionality is allowed when the ClipboardPasteMode property is set to Disable
Use the following code snippet:
public Form1()
{
    InitializeComponent();

    GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn("Id");
    radGridView1.MasterTemplate.Columns.Add(decimalColumn);

    GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn("Name");
    radGridView1.MasterTemplate.Columns.Add(textBoxColumn);

    GridViewDateTimeColumn dateTimeColumn = new GridViewDateTimeColumn("CreatedOn");
    radGridView1.MasterTemplate.Columns.Add(dateTimeColumn);

    radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    for (int i = 0; i < 10; i++)
    {
        radGridView1.Rows.Add(i, "Name" + i, DateTime.Now.AddDays(i));
    }
    radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Disable;
}

If you copy a cell content and try to paste it to another cell of the same column, the content is pasted successfully, although the ClipboardPasteMode property is set to Disable.
0 comments