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

Nested Listview

1 Answer 115 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Javier Gonzalez de Aragon
Top achievements
Rank 2
Javier Gonzalez de Aragon asked on 09 Feb 2016, 08:59 PM

Is nit possible to nest a listview within another listview using custom items?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Feb 2016, 02:40 PM
Hello Javier,

Thank you for writing.

Yes this is possible, you should use RadHostItem to add the control:
public class MyCustomVisualItem : SimpleListViewVisualItem
{
    RadListView  listview = new RadListView ();
 
    protected override void CreateChildElements()
    {
        base.CreateChildElements();
       
        for (int i = 0; i < 5; i++)
        {
            listview.Items.Add("Item " + i);
        }
        RadHostItem host = new RadHostItem(listview);
        this.Children.Add(host);
    }
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(SimpleListViewVisualItem);
        }
    }
}

Let me know if I can assist you further.
 
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Javier Gonzalez de Aragon
Top achievements
Rank 2
Answers by
Dimitar
Telerik team
Share this question
or