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

Filter on columns containing ' * '

5 Answers 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
salini
Top achievements
Rank 1
salini asked on 20 Dec 2010, 09:56 AM
Hi
I have a column in a grid view which contains values like '1234****345'
I am not able to use filters property on this column
please help me!

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 20 Dec 2010, 06:05 PM
Hi salini,

Thank you for the question.

You can use the Filter Dialog that RadGridView provides to filter by the desired criteria - set a string that matches the start of the value and also set a string that matches the end of the value. In order to open the dialog, click the filter button of the column and choose Custom.

I hope this helps.

Kind regards,
Nikolay
the Telerik team
Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
0
salini
Top achievements
Rank 1
answered on 21 Dec 2010, 07:37 AM
Thanks Nikolay
Can you give an example for the same.........
0
Nikolay
Telerik team
answered on 21 Dec 2010, 10:21 AM
Hi salini,

This is an end-user functionality which you can find in our Examples application, section GridView >> Filtering. You should click one of the arrow buttons on the filtering row of RadGridView and choose Custom from the drop-down menu. The Filter Dialog will open and you can define your filtering criteria according to your needs.

Kind regards,
Nikolay
the Telerik team
Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
0
salini
Top achievements
Rank 1
answered on 21 Dec 2010, 10:36 AM
thanks again
But you didn't understand me...
the filter is not working for "Equals" then.
And also for the drop down list box
If I select one or more  items in the drop down list,its not giving me any row.
only if I select all,it displays all row otherwise null...........
0
Accepted
Julian Benkov
Telerik team
answered on 27 Dec 2010, 05:44 PM
Hi salini,
Thank you for this clarification.

Now I understand the issue and managed to reproduce it. The issue is caused because escape *' characters. I added the issue in our Public Issue Tracking System and we will address it in one of our upcoming releases. You can follow this link in order to subscribe for this issue status updates.

You can work around the issue by handling the FilterChanging event. Please consider the following code snippet:

this.radGridView1.FilterChanging += new GridViewCollectionChangingEventHandler(radGridView1_FilterChanging);
 
void radGridView1_FilterChanging(object sender, GridViewCollectionChangingEventArgs e)
{
    CompositeFilterDescriptor fd = e.NewItems[0] as CompositeFilterDescriptor;
    if (fd.PropertyName == "col" && fd.Operator == FilterOperator.Contains)
    {
        foreach (FilterDescriptor d in fd.FilterDescriptors)
        {
            d.Value = d.Value.ToString().Replace("[*]", "*");
        }
    }
}

Your Telerik Points have been updated for this report. Let me know if you need further assistance.
 
Regards,
Julian Benkov
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Tags
General Discussions
Asked by
salini
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
salini
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or