We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Setting cell format for edit box

Hi, I have a grid with a datetime column. I've set the GridStyleInfo.Format for this column to "d MMM yyyy". When the user starts editing this cell, the full date+time is displayed instead of the configured format. How can I configure the grid so that it displays the custom format in the edit box (and also handles the parsing for this custom format)? -Ries

1 Reply

SH Stefan Hoenig Syncfusion Team August 5, 2002 12:53 PM UTC

Hello, we'll have a newer build shortly this week and there we actually made the following changes: 1) The default behavior is that the TextBox will display the same text that is shown in the cell and not the unformatted text. This text is determined by calling GridStyleInfo.GetFormattedText. 2) When the textbox is initialized with the text, a CurrentCellInitializeControlText event is raised. This lets you change the text that should be displayed in the active text box. This gives you a hook where you can then specify to show the unformatted and raw text for the cell. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon