Completed
Last Updated: 06 Jun 2016 13:47 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 26 May 2016 11:29
Category: GridView
Type: Bug Report
0
FIX. RadGridView - incorrect filtering when the cell value ends with space
To reproduce:

this.radGridView1.EnableFiltering = true;
this.radGridView1.Columns.Add("Test column");
this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.Rows.Add("Test ");

Workaround: use custom filtering: 

this.radGridView1.EnableCustomFiltering = true;
this.radGridView1.CustomFiltering += radGridView1_CustomFiltering;


private void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
{
    if (this.radGridView1.FilterDescriptors.Count > 0)
    {
        GridViewCellInfo cell = e.Row.Cells[this.radGridView1.FilterDescriptors[0].PropertyName];
        e.Visible = cell.Value.ToString().StartsWith(this.radGridView1.FilterDescriptors[0].Value.ToString());
    }
}
Attached Files:
0 comments