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