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

How to add Filter in Header section

1 Answer 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 05 Oct 2012, 01:47 PM
Greetings,

Is it possible to add the Grid Filter in the Header Section of the Grid instead of below the header in its own row?

IF that is not possible, is it possible to create a filter exactly like the one used in the Filter Row section? A filer that has the button with all the filtering options (Contains, Equals, Not Equal, etc....)

Or is it possible to eliminate the Header all together and just put the header in the Filter Section ?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 10 Oct 2012, 01:44 PM
Hi James,

You could check out this demo wherea header context filter menu is shown, which is a sub-part or RadGrid's header context menu. Additionally, if you want to hide the headers you could loop through the collection of the GridHeaderItem cells and set their Visible property to false.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridHeaderItem)
        {
            GridHeaderItem item = e.Item as GridHeaderItem;
            foreach (TableCell cell in item.Cells)
            {
                cell.Visible = false;
            }
        }
    }


Regards,
Kostadin
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
James
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or