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

Filter in Hierarchical Grid

1 Answer 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Darko
Top achievements
Rank 1
Darko asked on 14 Oct 2011, 05:19 PM
Hi, 

i am looking at the Samples for the latest Release (Q2 2011 SP1) of the tools and 
I found the GridView/Custom Filtering sample very usefull.
However, my Grid is bound to the Data using the  AutoGenerateHierarchy feature.
The Grid is bound to  the BindingSource which is bound to a BindingList<T> which
is basically 3 Levels deep. The binding works great... I get 3 levels hierachical Grid.

I would love to apply the mentioned sample of Custom Formatting to the whole Grid Data,
e.g. the Text entered in the Filter TextBox should be searched in each Column and in each Row in every Level
of the hierarchy. Is that possible? If not, do you have a suggestion for me how to filter the Grid without
drilling down manually in every Level of it?

Thanks and best regards,
Darko


1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 19 Oct 2011, 02:09 PM
Hi Darko,

You can use the codebase from our Demo Application to make a custom filtering to the all levels in hierarchy mode. The CustomFiltering event is raised for every GridViewTemplate. The important thing in this scenario is to call Refresh method of MasterTemplate to cause event firing for every text change:

private void filterTextBox_TextChanged(object sender, EventArgs e)
{
    this.radGridView.MasterTemplate.Refresh();
}

Do not hesitate to contact us if you have further questions or issues.

Greetings,
Julian Benkov
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
GridView
Asked by
Darko
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or