C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Problem with input date values on C1TrueDBGrid

rated by 0 users
This post has 3 Replies | 1 Follower

Not Ranked
Posts 2
thuong Posted: Wed, Nov 12 2008 3:59 AM

 Dear all,

I  have a problem with this type of grid. My grid has several columns which data type is datetime. When I type a value such as 23/10/2008 then the text is changed to  : _3/10/2008. This error occures when I use Ctrl+S or Enter key.

the columns is set to following values

.EditMask =00/00/0000 (ShortDate)

.EditMaskUpdate = True

.EnableDateTimePicker = False. 

.NumberFormat = EditMask 

Thanks for any help! 

 

Top 25 Contributor
Posts 455
Hello,
 
With regards to your query, i have created a sample project which implements the date formatting using EditMask and NumberFormat property. I tried pressing Enter or Ctrl +S and it is working as expected.
 
Regards,
Gary
<thuong> wrote in message news:211216@10.0.1.98...

 Dear all,

I  have a problem with this type of grid. My grid has several columns which data type is datetime. When I type a value such as 23/10/2008 then the text is changed to  : _3/10/2008. This error occures when I use Ctrl+S or Enter key.

the columns is set to following values

.EditMask =00/00/0000 (ShortDate)

.EditMaskUpdate = True

.EnableDateTimePicker = False. 

.NumberFormat = EditMask 

Thanks for any help! 

 



http://helpcentral.componentone.com/cs/forums/p/77248/211216.aspx#211216

Not Ranked
Posts 2
thuong replied on Fri, Nov 14 2008 12:02 AM

Hello Gary,

I appreciate your try on this issue. I forgot describing more details in last post that the grid has data "  /  /   " on each row and the grid has many rows on it. The sequence operating causes the error is as following :  In the first row on that date column, type Ctr S (it is the function of my grid) to copy this cell value "  /  /   "  to the beneath cells also belong to that col. After that I move to the these cells to type date value (23/10/2008) and that error to appear. It is more difficult as the error not always happens. Because my grid loads data from SQL Server 2000 database and I wonder if that was the difference. 

thank you again! 

Top 25 Contributor
Posts 455
C1_GaryB replied on Fri, Nov 14 2008 12:30 AM
Hello,
 
Regarding this query, as you have mentioned that it is an intermittent issue, I would sugegst you to investigate further with your function (Ctrl + S), as once you apply the column fomratting using the EditMask and NumberFormat, it sort of caused validation on that column (where formatting has been implemented using EditMask & NumberFormat).
 
To illustrate this point further, in sample project I sent you, if you enter any date not in a defined format (using EditMask and NumberFormat), it prompts you for the correct input format for that particular column.
 
Regards,
Gary
 
 
<thuong> wrote in message news:211322@10.0.1.98...

Hello Gary,

I appreciate your try on this issue. I forgot describing more details in last post that the grid has data "  /  /   " on each row and the grid has many rows on it. The sequence operating causes the error is as following :  In the first row on that date column, type Ctr S (it is the function of my grid) to copy this cell value "  /  /   "  to the beneath cells also belong to that col. After that I move to the these cells to type date value (23/10/2008) and that error to appear. It is more difficult as the error not always happens. Because my grid loads data from SQL Server 2000 database and I wonder if that was the difference. 

thank you again! 



http://helpcentral.componentone.com/cs/forums/p/77248/211322.aspx#211322

Page 1 of 1 (4 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.