Completed
Last Updated: 19 Jun 2017 12:38 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 30 May 2017 10:25
Category: GridView
Type: Bug Report
1
FIX. RadGridView - filtering doesn't work in self-reference hierarchy and GridViewDateTimeColumn.FilteringMode set to Date
To reproduce: Please refer to the attached gif file and follow the steps 

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("ParentId", typeof(int));
            dt.Columns.Add("Date", typeof(DateTime));
            Random rand = new Random();
            for (int i = 0; i < 5; i++)
            {
                dt.Rows.Add(i, -1, DateTime.Now);
            }
            for (int j = 5; j < 10; j++)
            {
                dt.Rows.Add(j, rand.Next(0, 5), DateTime.Now.AddDays(j));
            }

            this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "Id", "ParentId");
            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            GridViewDateTimeColumn dateTimeColumn = this.radGridView1.Columns.Last() as GridViewDateTimeColumn;
            dateTimeColumn.FilteringMode = GridViewTimeFilteringMode.Date;
            this.radGridView1.EnableFiltering = true;

Workaround: use the standard hierarchy: http://docs.telerik.com/devtools/winforms/gridview/hierarchical-grid/binding-to-hierarchical-data-programmatically
OR the custom filtering: http://docs.telerik.com/devtools/winforms/gridview/filtering/custom-filtering
0 comments