This is a migrated thread and some comments may be shown as answers.

Grid filter enumaration

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hugo
Top achievements
Rank 1
Hugo asked on 09 Mar 2012, 02:09 PM
I like to propose a improvement for the grid filter menu.

The GridKnownFunction enumeration lists the possible filter functions 

Example:
        // Summary:
        //     Same as: dataField LIKE 'value/%'
        StartsWith = 3,

But why are these GridKnownFunction enumeration NOT used in the GridFilterMenu items.
Example:

protected void RadGrid1_Init(object sender, System.EventArgs e)
{
    GridFilterMenu menu = RadGrid1.FilterMenu;
    int i = 0;
    while (i < menu.Items.Count)
    {
        if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "Contains" || menu.Items[i].Text == "EqualTo" || menu.Items[i].Text == "GreaterThan" || menu.Items[i].Text == "LessThan")
        {
            i++;
        }
        else
        {
            menu.Items.RemoveAt(i);
        }
    }
}

I do not like to use these string values in code (because when telerik decide to change them, 
i must adapt my code and i don't like that kind of work)
Therefore Telerik please at lease create const string for it.
Example
    GridFilterMenuNoFilter = "NoFilter";


1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 14 Mar 2012, 12:29 PM
Hi Hugo,

Thank you for the suggestions. We appreciate your opinion as a customer. I want to assure you that I passed your feature request to our developers for future consideration. Decisions for future implementations are taken based on customer demands rate and the controls needs. Additionally, you could create constant string values which you could use. Note that changing such features will introduce breaking change on our side which means it is safe to use such hard coded values in your code.

All the best,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Hugo
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or