This is a migrated thread and some comments may be shown as answers.

String changes to date

1 Answer 24 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Ryan Morgan
Top achievements
Rank 1
Ryan Morgan asked on 13 May 2016, 03:37 PM

Good day,

In the spreadsheet control any time you type a string that resembles a date or time, the format for the cell changes to Date.

For instance, if you go to the DataSource Binding demo at http://demos.telerik.com/aspnet-mvc/spreadsheet/datasource and type 10:00 PM in the ProductName column the current date will be displayed in the cell. If you type 10-10-10 it will be changed to 10/10/2010. If you type 10:99 it gets changed to 11:39.

So with a spreadsheet that is bound to a datasource. How do you force a column to keep the input string as a string?

Thanks and Regards

 

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 17 May 2016, 08:32 AM
Hi,

In order to force the value of the cell to be read as a string, you have to preface it with a ' symbol. For instance if you write '10:00 PM the value will be shown as you expect.

Regards,
Bozhidar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Spreadsheet
Asked by
Ryan Morgan
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or