private void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e) { if (e.ItemPropertyDefinition.PropertyName == "Year") { RadDatePicker dateTimePickerEditor = (RadDatePicker)e.Editor; //dateTimePickerEditor.InputMode = Telerik.Windows.Controls.InputMode.DatePicker; dateTimePickerEditor.SelectionChanged += (ss, ee) => { if (ee.AddedItems.Count > 0) { DateTime date = (DateTime)ee.AddedItems[0]; dateTimePickerEditor.DateTimeText = date.Year.ToString(); } }; } //bug,虽然value变了,但显示在界面上的还是1月,估计是作为查询条件控件时就有的bug //else if (e.ItemPropertyDefinition.PropertyName == "Month") //{ // RadNumericUpDown num = (RadNumericUpDown)e.Editor; // num.Value = DateTime.Now.Month; //} }
private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e) { RadComboBox cbx = e.Editor as RadComboBox; if (cbx != null) { switch (e.ItemPropertyDefinition.PropertyName) { case "Grade": cbx.ItemsSource = _dataContext.AvailableGrades; break; case "CarriedStandard": cbx.ItemsSource = _dataContext.AvailableCarriedStandards; break; case "SafetyTechnique": cbx.ItemsSource = _dataContext.AvailableSafetyTechs; break; } } SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor); }
private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e) { RadComboBox cbx = e.Editor as RadComboBox; if (cbx != null) { switch (e.ItemPropertyDefinition.PropertyName) { case "BrandID": cbx.ItemsSource = VMGlobal.PoweredBrands; break; case "StorageID": cbx.ItemsSource = StorageInfoVM.Storages; break; case "NameID": cbx.ItemsSource = VMGlobal.ProNames; break; } } SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor); }
private void billFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e) { SysProcessView.UIHelper.ToggleShowEqualFilterOperatorOnly(e.Editor); }