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

How create custom treeview for RadListFilterPopup?

3 Answers 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stanley
Top achievements
Rank 1
Stanley asked on 08 Jun 2012, 09:30 AM
First, I have prepared my data in a radTreeView control.
Then, how assign treeview to RadListFilterPopup?


Please refer the pciture from attachment.
Any way can be done?


RadHostItem h = new RadHostItem(this.radTreeView1);


void radGridView1_FilterPopupRequired2(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e)
{
    if (e.Column.Name == "Store")
    {
        e.FilterPopup = new RadListFilterPopup(this.radTreeView1, true);
    }
}

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Jun 2012, 08:36 AM
Hello Stanley,

Thank you for writing.

The tree in RadListFilterPopup cannot be replaced, however it can be accessed and modified. Here is a sample, where I am clearing all nodes and I am adding new ones:
void radGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e)
{
    if (e.Column.Name == "Name")
    {
        RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
        popup.MenuTreeElement.TreeView.Nodes.Clear();
        for (int i = 0; i < 10; i++)
        {
            popup.MenuTreeElement.TreeView.Nodes.Add("Node Name " + i);
        }
    }
}

I hope this helps. Let us know if you have any other questions.
 
Greetings,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Alec
Top achievements
Rank 1
answered on 24 Apr 2020, 01:30 PM

I have tried using this technique to remove the pre-existing tree view nodes and add new nodes, but when I select one of the new nodes and click the OK button to filter based on the new node, nothing happens.  Do I need to add something else to get the filter to actually work?

Thanks,
Alec

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Apr 2020, 12:26 PM

Hello, Alec,

Your question has already been answered in the other thread you have posted on the same topic. Please, see our answer there for more information.
We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
GridView
Asked by
Stanley
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Alec
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or