I want to use a spin control in my grid to handle time (HH:mm:ss).
I linked WebDateTimeEdit to one of my columns and set EditModeFormat to "HH:mm:ss"
The column displays the correct control and the spin buttons work, but any value I enter is reset to blank the next time I set focus in that cell.
There are other threads on the forum that suggest this has something to do with CultureInfo. I think the issue is WebDateTimeEdit doesn't recognize the value I enter as a proper date (why???) so it's blanking it out.
On a second time control where EditModeFormat = "HH:mm" the WebDateTimeEdit control is changing it's value to yy:mm (yes, that's year, month).
Every time I load a page I am setting currentthread.cultureinfo so that my date formats are yy/mm/dd, and this format coincides with how my time controls are reset...but WHY!!!!!!!
At the end of the day I need a control that supports HH:mm:ss and HH:mm (with spin buttons) and the value is not cleared out or set to a funky date format. Am I using the wrong control? If I am using the correct control how do I get CultureInfo under control???
HELP!!!!!!
I was having the same mistake that u... I probe with this format and that's it .. :)
wdteControl.EditModeFormat = "dd/MM/yyyy hh:mm tt";
Hi,
I do not know why it happens. I added spin buttons and it worked correctly. Grid was updated with value in editor regardless, if spin buttons were used or not. I tested latest version of datetimeeditor and version built around half year ago.
<igtxt:WebDateTimeEdit ID="WebDateTimeEdit1" runat="server" EditModeFormat="HH:mm"> <SpinButtons Display="OnRight" /></igtxt:WebDateTimeEdit>
Try to test a temporary page which contains only grid with simple data and WebDateTimeEditor. If problem persists, then please submit a bug report with a simple sample to reproduce.
Hi Vicktor, i am having teh same problem.. I can get the datetime weditor to display in teh cell no problems, but when you change values of the datetime via the spin buttons, then when you leave the cell, it resets back to the default value of the cell, any ideas?
I suspect that there is problem with assigning editor to grid. In order to set embedded editor to a column, you should set only EditorControlID to the UniqueID of editor and set Type to Custom, and nothing else (no format, etc).
this.UltraWebGrid1.Columns[3].EditorControlID = this.WebDateTimeEdit1.UniqueID;this.UltraWebGrid1.Columns[3].Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Custom;
Also, in case of WebDateTimeEdit the cells for that column should contain DateTime objects and the type of column should be set to DateTime:
So, I tested<igtxt:WebDateTimeEdit ID="WebDateTimeEdit1" runat="server" EditModeFormat="HH:mm"></igtxt:WebDateTimeEdit>and it worked fine, it displayed start-edit mode time value and saved that value to grid.