in

C1 Community

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

Problem with input date values on C1TrueDBGrid

Last post 11-14-2008 12:30 AM by C1_GaryB. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-12-2008 3:59 AM

    • thuong
    • Not Ranked
    • Joined on 11-12-2008
    • Posts 2

    Problem with input date values on C1TrueDBGrid

     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! 

     

    Filed under: ,
  • 11-12-2008 2:06 PM In reply to

    Re: Problem with input date values on C1TrueDBGrid

    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

  • 11-14-2008 12:02 AM In reply to

    • thuong
    • Not Ranked
    • Joined on 11-12-2008
    • Posts 2

    Re: Problem with input date values on C1TrueDBGrid

    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! 

  • 11-14-2008 12:30 AM In reply to

    Re: Problem with input date values on C1TrueDBGrid

    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)
Contact ComponentOne: 1.800.858.2739 ©1987-2009 ComponentOne LLC All Rights Reserved.