Completed
Last Updated: 21 Nov 2014 14:22 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 10 Nov 2014 08:31
Category: GridView
Type: Bug Report
0
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));

0 comments