Completed
Last Updated: 14 Jun 2012 05:02 by ADMIN
ADMIN
Stefan
Created on: 14 Jun 2012 05:02
Category: GridView
Type: Bug Report
0
FIX. RadGridView - FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo should work with null
FIX. RadGridView - FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo should work with null using System; using System.Data; using System.Windows.Forms; using Telerik.WinControls.Data; using Telerik.WinControls.UI; namespace Lab.Grid { public partial class GridFilterEqualNullSupport : MainForm { private RadGridView gridView = new RadGridView(); public GridFilterEqualNullSupport() { InitializeComponent(); gridView.Dock = DockStyle.Fill; gridView.Parent = this; gridView.BringToFront(); gridView.EnableFiltering = true; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); DataTable table = new DataTable(); table.Columns.Add("Id", typeof(int)); table.Columns.Add("Name"); table.Columns.Add("Number", typeof(DateTime)); table.Rows.Add(1, "Ivan", DateTime.Now); table.Rows.Add(2, "Ivan", DateTime.Now.AddDays(-1)); table.Rows.Add(null, "Peter", DateTime.Now); table.Rows.Add(4, "George", null); table.Rows.Add(5, "George", null); table.Rows.Add(null, "George", null); table.Rows.Add(7, "Enzo", DateTime.Now.AddDays(-3)); table.Rows.Add(8, "Enzo", DateTime.Now.AddDays(5)); table.Rows.Add(null, "Enzo", null); table.Rows.Add(10, "Enzo", DateTime.Now.AddDays(-1)); gridView.DataSource = table; } protected override void OnButton1Click() { base.OnButton1Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton2Click() { base.OnButton2Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsNotEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton3Click() { FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, ""); gridView.FilterDescriptors.Add(filter1); } } }

1. Open attached project and run it. 2. Click button 1 and you will see that is not apply 

0 comments