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; }

Loader.
Up arrow icon