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

Customize my filter option inside the grid view

2 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prassin
Top achievements
Rank 1
Prassin asked on 09 Jun 2012, 07:29 AM

Hi,
i wish to reduce my filter options on my grid view control... i need only "contain" and "start with" option inside my filter option.. please help me soon..

Regards,
Prassin 

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 09 Jun 2012, 05:30 PM
Hello,

protected void RadGrid1_Init(object sender, EventArgs e)
        {
            GridFilterMenu menu = RadGrid1.FilterMenu;
            int i = 0;
            while (i < menu.Items.Count)
            {
                if (menu.Items[i].Text.ToLower() != "startswith" &&
                   menu.Items[i].Text.ToLower() != "contains" )
                {
                    menu.Items.RemoveAt(i);
                }
                else
                {
                    i++;
                }
 
            }
 
        }


Thanks,
Jayesh Goyani
0
Prassin
Top achievements
Rank 1
answered on 11 Jun 2012, 04:53 AM
Hello,,


Thanks very much bru.....

its working....


Regards,

Prassin
Tags
Grid
Asked by
Prassin
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Prassin
Top achievements
Rank 1
Share this question
or