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

GridDateTimeColumn AutoCorrect Function Not Firing Consistently

3 Answers 22 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 02 Oct 2014, 04:18 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 07 Oct 2014, 11:20 AM
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.

 
0
Joe
Top achievements
Rank 1
answered on 15 Oct 2014, 02:18 PM
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
0
Viktor Tachev
Telerik team
answered on 20 Oct 2014, 11:34 AM
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.

 
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Joe
Top achievements
Rank 1
Share this question
or