protected override void OnLoad(EventArgs e) { base.OnLoad(e); int activeViewIndex = 0; TabView activeView = (TabView)MultiView.Views[activeViewIndex]; if (activeViewIndex > 0) { MultiView.SetActiveView(activeView); } }
protected bool SaveObject() { EnsurePostLoadInvoked(); EnsureValidatableControlsInitialized(); bool isValid = DataSource.Validate(); Control firstInvalidControl = null; foreach (DataEditUserControl control in DataEditUserControls) { if (!control.Validate()) { isValid = false; firstInvalidControl = control; break; } } if (isValid) { foreach (DataEditUserControl control in DataEditUserControls) { control.SaveValues(false); } DataSource.SaveValues(false); _isSaved = true; // transaction will be committed by caller or using auto commit. } else { TabbedMultiView multiView = UserControlMultiView; if (multiView != null) { for (Control control = firstInvalidControl; control != null; control = control.Parent) { if (control is TabView) { multiView.SetActiveView((TabView)control); break; } } } } return(isValid); }