Last Updated: 21 Nov 2014 14:22 by ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 10 Nov 2014 08:31
Category: GridView
Type: Bug Report
FIX. RadGridView - LexicalException when filtering by a column with TimeSpan value
To reproduce: use the following code snippet:

DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("Duration", typeof(TimeSpan));

for (int i = 0; i < 20; i++)
    dt.Rows.Add(i, "Item" + i, TimeSpan.FromMinutes(i * 10));

this.radGridView1.DataSource = dt;
this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.EnableFiltering = true;
this.radGridView1.ShowHeaderCellButtons = true;

Try to filter via the Excel-Like filtering functionality.

Workaround: use dt.Columns.Add("Duration", typeof(string)); instead of dt.Columns.Add("Duration", typeof(TimeSpan));

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)