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 am using the event “CurrentCellValidating” to do some validations.
I get the value entered in the cell as follows:
string newValue = grid.CurrentCell.Renderer.ControlText;
The problem:
Sometimes I might want to change the data entered by the user; like adding a text.
grid.CurrentCell.Renderer.ControlText = “$ “ + newValue;
If the user presses the “Enter” key, it works fine, but if the user presses an arrow key to move to another cell, the cell displays the edited text but does not exit the editing mode. If the arrow key is pressed again, the cell value is cleared.
If the text is not modified in the event, the arrow keys work fine.
Thanks.
ADAdministrator Syncfusion Team November 12, 2002 11:16 AM UTC
Try setting the Renderer.Control.Text member instead of Rendere.ControlText.
this.gridControl1.CurrentCell.Renderer.Control.Text = "$" + this.gridControl1.CurrentCell.Renderer.ControlText;
TMTeodorico MorellNovember 12, 2002 12:53 PM UTC
Clay,
It worked fine.
It also helps me to do other stuff like removing the thousand separators when entering edit mode.
Thanks.