or
Hi
How can I filter radGridView (2012.1.321.40) with BindingList<IPresenceLog> on nullable DateTime field "SystemEnd" to get entries with
SystemEnd.Hasvalue=false? Neither the simple FilterDescriptor nor the DateFilterDescriptor seems to work with any of the available FilterOperators.
//public class PresenceLogModel : PresenceLog, INotifyPropertyChanged, IValidatable //public class PresenceLog : IPresenceLog //private BindingList<IPresenceLog> _PresenceLogList = new BindingList<IPresenceLog>(); private void BindDataSource() { if (radGridViewPZE.Columns.Count == 0) { radGridViewPZE.MasterTemplate.AutoGenerateColumns = false; radGridViewPZE.DataSource = _PresenceLogList; radGridViewPZE.Columns.Add(CommonFunctions.NewTextCol("ResourceNo", "Resource", 100, true)); radGridViewPZE.Columns.Add(CommonFunctions.NewTextCol("ResourceName", "Resourcen Name", 120, true)); radGridViewPZE.Columns.Add(CommonFunctions.NewDateTimeCol("SystemBegin", "Begin", 100, true)); radGridViewPZE.Columns.Add(CommonFunctions.NewDateTimeColWithNull("SystemEnd", "Ende", 100, true)); } else radGridViewPZE.DataSource = _PresenceLogList; } public static GridViewDateTimeColumn NewDateTimeCol(string fieldname, string title, int width, bool isvisible) { GridViewDateTimeColumn col = new GridViewDateTimeColumn(fieldname); col.Name = fieldname; col.HeaderText = title; col.Width = width; col.IsVisible = isvisible; col.DataType = typeof(DateTime); col.FormatString = "{0:dd.MM.yy HH:mm}"; //dd/MM/yyyy HH:mm return col; } public static GridViewDateTimeColumn NewDateTimeColWithNull(string fieldname, string title, int width, bool isvisible) { GridViewDateTimeColumn col = new GridViewDateTimeColumn(fieldname); col.Name = fieldname; col.HeaderText = title; col.Width = width; col.IsVisible = isvisible; col.DataType = typeof(System.Nullable<DateTime>); col.FormatString = "{0:dd.MM.yy HH:mm}"; //dd/MM/yyyy HH:mm return col; } private void cmbTBFilterOpenEntries_ToggleStateChanged(object sender, StateChangedEventArgs args) { if (cmbTBFilterOpenEntries.ToggleState == ToggleState.On) { if (resourceFilterOpenEntries == null) { //resourceFilterOpenEntries = new DateFilterDescriptor("SystemEnd", FilterOperator.IsEqualTo, new DateTime?(),true); resourceFilterOpenEntries = new DateFilterDescriptor(); resourceFilterOpenEntries.PropertyName = "SystemEnd"; resourceFilterOpenEntries.Operator = FilterOperator.IsNull; //FilterOperator.IsEqualTo resourceFilterOpenEntries.Value = null; //resourceFilterOpenEntries.IsFilterEditor = true; } this.radGridViewPZE.FilterDescriptors.Add(resourceFilterOpenEntries); if (!(radGridViewPZE.EnableFiltering)) radGridViewPZE.EnableFiltering = true; } else { this.radGridViewPZE.FilterDescriptors.Remove(resourceFilterOpenEntries); } }
private void AddinModule_OfficeColorSchemeChanged(object sender, OfficeColorScheme theme){ string themeName = string.Format("Office2010{0}", theme); if (!this.themes.ContainsKey(themeName)) { switch (theme) { case OfficeColorScheme.Black: this.themes.Add(themeName, Activator.CreateInstance<Office2010BlackTheme>()); break; case OfficeColorScheme.Blue: this.themes.Add(themeName, Activator.CreateInstance<Office2010BlueTheme>()); break; case OfficeColorScheme.Silver: this.themes.Add(themeName, Activator.CreateInstance<Office2010SilverTheme>()); break; } } ThemeResolutionService.ApplicationThemeName = themeName;}[Completely new with Telerik]
Hi
I have a Category column in Employee Table as of type GridViewComboBoxColumn and i have assigned a datasource to it.
The values of this column can be "Male" or "Female". The datasouce contains these two values.
While adding new record I want to pick up 1st available value in datasource as default selected.
How can i do this?
Regards
Raghu.