public override void DataBind() { base.DataBind(); GotoDateFormTemplateContainer container = (GotoDateFormTemplateContainer)Parent; cbView.Value = container.ActiveViewType.ToString(); btnOk.ClientSideEvents.Click = container.ApplyHandler; btnCancel.ClientSideEvents.Click = container.CancelHandler; ASPxScheduler scheduler = container.Control; string actualSchedulerInstanceName = scheduler.ClientInstanceName; if (String.IsNullOrEmpty(actualSchedulerInstanceName)) { actualSchedulerInstanceName = scheduler.ClientID; } edtDate.ClientSideEvents.LostFocus = String.Format(@"function(s,e) {{ var date = s.GetDate(); if (date == null || date == false) {{ var selectionInterval = {0}.GetSelectedInterval(); var startDate = selectionInterval.GetStart(); s.SetDate(startDate); }} }}", actualSchedulerInstanceName); }
public override void DataBind() { base.DataBind(); GotoDateFormTemplateContainer container = (GotoDateFormTemplateContainer)Parent; cbView.Value = container.ActiveViewType.ToString(); btnOk.ClientSideEvents.Click = container.ApplyHandler; btnCancel.ClientSideEvents.Click = container.CancelHandler; }
void PrepareChildControls() { GotoDateFormTemplateContainer container = (GotoDateFormTemplateContainer)Parent; ASPxScheduler control = container.Control; ASPxEditBase[] edits = new ASPxEditBase[] { lblDate, edtDate, lblView, cbView }; foreach (ASPxEditBase edit in edits) { edit.ParentSkinOwner = control; edit.ParentStyles = control.Styles.FormEditors; edit.ParentImages = control.Images.FormEditors; } btnOk.ParentSkinOwner = btnCancel.ParentSkinOwner = control; }