We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Allowing new lines in DataBoundGrid Paste

Hi, I have a data bound grid. I would like the user to paste any text into the TextBox cell. This text may contain new line characters. How do I allow that? thanks, - Reddy

1 Reply

AD Administrator Syncfusion Team August 15, 2003 12:54 PM UTC

Nevermind. I got it to work by using the DBG Model ClipboardPaste event. I was looking for that event in the grid. For regular Grid Control it was there in the Grid. For DBG, it is there in the model. thanks, - Reddy ----------------------------------- private void queryDBGModel_ClipboardPaste(object sender, GridCutPasteEventArgs e) { GridCurrentCell cc = queryDBG.CurrentCell; int row = cc.RowIndex; int col = cc.ColIndex; IDataObject iData = Clipboard.GetDataObject(); string str = iData.GetData(DataFormats.Text) as string; if(queryDBG[row, col].CellType == "TextBox") { cc.Renderer.Paste(); } e.Handled = true; }

Live Chat Icon For mobile
Up arrow icon