Using version 6.2
I have a problem with a wizard server control that has an ultrawebgrid on the second page that embeds a webdatetimeedit control. When the user views the first page the ultrawebgrid has not been rendered so the webdatetimedit control is visible at the bottom of the page. If I declaritively set the webdatetimeedit control visible=false the date is displayed in long date/time format in edit mode even though I specify short date format when I do get to the second page. I do not want to set up the ultrawebgrid column definitions until I get to the second page because of some overhead issues.
Here some simplified HTML and code that demonstrates the problem without the wizard.<body> <form id="form1" runat="server"> <div> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"/> </div> <igtxt:WebDateTimeEdit ID="WebDateTimeEdit1" runat="server" DataMode="EditModeText" Visible="false"/> </form></body>
And the code behind...Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load With UltraWebGrid1.Columns If .Count = 0 Then .Add("Date", "Date") .FromKey("Date").DataType = GetType(Date).ToString .FromKey("Date").DefaultValue = Now() .FromKey("Date").EditorControlID = WebDateTimeEdit1.UniqueID .FromKey("Date").Type = ColumnType.Custom .FromKey("Date").Format = "MM/dd/yyyy" End If End With
UltraWebGrid1.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes UltraWebGrid1.DisplayLayout.CellClickActionDefault = CellClickAction.RowSelectEnd Sub
If you double-click the cell you will see the date format changes from short date to long date/time when the cell is put in edit mode. Removing the visible="false" attribute from the webdatetimeedit control corrects this behaviour but leaves the webdatetimeedit control visible until the .EditorControlID attribute on the ultrawebgrid is rendered.
Any observations would be welcome.
ThanksTerry Hutt
Hi iam having the following problem
We set EditModeFormat of WebDateTimeEdit to "hh:mm:ss tt" but the last AM and PM in spanish culture(es-CO) is truncating for ex "10:10:10 a." instead of "10:10:10 a.m.", this is working fine for en-US like 10:10:10 AM.Let me know what iam doing wrong.
Thanks
MuthuKumaraSamy,