GridDateTimeColumn AutoCorrect Function Not Firing Consistently

4 posts, 1 answers
  1. Joe
    Joe avatar
    16 posts
    Member since:
    Oct 2013

    Posted 02 Oct 2014 Link to this post

    Hi,

    I have several radgrids on a aspx page that each have a GridDateTimeColumn that has a column labeled 'Signature Date' with the following format below:

    <telerik:GridDateTimeColumn HeaderText="Sign Date"
    DataField="SignatureDate"
    UniqueName="SignatureDate"  
    EditDataFormatString="MM/dd/yyyy"
    MaxLength="10">
    <HeaderStyle Width="120px" />
    </telerik:GridDateTimeColumn>

    On some of these aforementioned grids, when tabbing away from the field or clicking the insert/update button for the edit item, causes the column field to autoparse the date format to it's correct format which is 'MM/dd/yyyy' which is the intent, but on some of the other grids, it does not do this. The only way to get it to fire is to click out of the field and then click back into it which then causes it to fire.

    How can I ensure that this function fires every time the user tabs away or clicks the appropriate image button (insert/update) inside of the radgrid edit item?

    Thanks,

    Joe
  2. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 07 Oct 2014 Link to this post

    Hello Joe,

    I tried replicating the behavior you describe, however, I was unable to. I am attaching a sample project I used for testing. It is working as expected on my end.

    Would you run the sample and let me know if I am missing something? I would appreciate it if you let me know what needs to be modified in the sample in order to replicate the behavior you are seeing.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joe
    Joe avatar
    16 posts
    Member since:
    Oct 2013

    Posted 15 Oct 2014 in reply to Viktor Tachev Link to this post

    Viktor,

    I finally got it working, but the issue seemed to lay in the fact that after selecting a value from a radcombo box in the edit item, the focus seemed to be lost and the function wouldn't fire correctly. After programmatically setting the focus back to the combo box on the selectedIndex_changed event, the issue was corrected and the GridDateTimeColumn value would parse correctly.

    Thanks for your help with this issue.

    - Joe
  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 20 Oct 2014 Link to this post

    Hello Joe,

    I am glad to hear that the problem was resolved. Thank you for sharing your experience with the community.

    Regards,
    Viktor Tachev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top