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 Clay,
Could you please advice on how to control user input. Does a databound grid cell have kind of ‘numeric’ property or I have to write code to validate the input. Then what is the best event to do that. I want to allow the user to enter into the cell only numbers with one decimal point in the range from -99.9 to 99.9 and do not allow to type letters at all.
I set the cell type of double and use gdbg.Binder.InternalColumns[“colname”].StyleInfo.Format = "#0.0";
It still allows user to enter many decimal points and type letters. What is the best way to fix that?
Thanks in advance
ADAdministrator Syncfusion Team September 1, 2004 11:05 AM UTC
To do chacter by character validation, you will have to use the CurrentCellValidateString event. There, check e.Text to make sure it is valid, and set e.Cancel = true if it is not. To get teh row and column of the cell being validated, use grid.CurrentCell.RowIndex/COlindex.