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 searched the forums but cant find the solution to what seems like a very silly problem;
The user is only allowed to enter max 30 chars in a grid cell. I can handle the typing of chars in the CurrentCellKeyPress event, but when the user paste into the cell my length restriction gets bypassed.
How do i interrupt the paste process so only the first 30 chars end up in the cell?
regards Fredrik
STstanleyj Syncfusion Team January 18, 2006 12:16 PM UTC
Hi Fredrik,
Try handling PasteCellText to strip off the extra characters.
private void gridControl1_PasteCellText(object sender, GridPasteCellTextEventArgs e)
{
string s = e.Text;
e.Text = s.Remove(30,(s.Length-30));
}
Best regards,
Stanley
FSFredrik StrömJanuary 18, 2006 01:16 PM UTC
Thanx for the answer Stanley, but the I don''t seem to get the PasteCellText event. I do get the ClipboardPaste though.
regards Fredrik
FSFredrik StrömJanuary 18, 2006 01:17 PM UTC
Thanx for the answer Stanley, but the I don''t seem to get the PasteCellText event. I do get the ClipboardPaste though.
regards Fredrik
FSFredrik StrömJanuary 18, 2006 01:17 PM UTC
Thanx for the answer Stanley, but the I don''t seem to get the PasteCellText event. I do get the ClipboardPaste though.
regards Fredrik