Hi, I don't see a current post, so here it is. I have a WebDateTimeEditor below. I have the properties set, I've even tried setting them in code-behind, but nothing seems to change the format. When I attach the columnkey property to my grid field, the data is presented as Mon May 23 00:00:00 CDT, instead of 5/23/2011. I tried a format string of mm/dd/yyyy, but the online help only showed g for short date string. Also, when I click it to edit ti shows the date/time format of __/__/____ __:__. This of course is not correct either. If I should just be using a different format string, other than mm/dd/yyyy, what is it since help only shows "g" in the code-behind sample? Thanks.
<ig:WebDateTimeEditor ID="dtPerformancePlanCompletedDate" runat="server" BackColor="yellow" DataMode="DateOrDBNull" DisplayModeFormat="g" EditModeFormat="g" Nullable="true" NullText="Select a Date" columnkey="COMPLETEDDATE"></ig:WebDateTimeEditor>
Hello Dbishop9,
The format of the datetime column in your grid needs to be the same like in the WebDataTime editor. If you apply a short date time for the grids column the results should appear as expected.
Try this approach and let me know if it works for you.
Also you can attach your sample here and I could investigate and modify it.
Looking forward to hear from you
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Thanks, Georgi. Below is the format I have for the grid column in the InitializeLayout method. But I'm not familiar with the date formatting for the WebDateTime editor of "g" (see previous post). Is this the correct format code to use in the WebDateTime editor or should I be using something else? And the code below correct for the grid column?
.DataType = "System.DateTime".Format = "MM/dd/yyyy"