Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Adding Grand Child in Web Explorer Bar through cs code
posted

I want to add grand child in web explorer bar through cs code,not through html

I have created group and add items to them but i want to add sub items(grand child)

Can some one please guide me that how can I add sub child(grand child) in web explorer bar?

Here is my code

ExplorerBarGroup group = new ExplorerBarGroup();

group.Text = "Drives";
this.WebExplorerBar1.Groups.Add(group);
item = new ExplorerBarItem();
item.Text = "C:";
group.Items.Add(item);
item = new ExplorerBarItem();
item.Text = "D:";

Parents
  • 1300
    Verified Answer
    Offline posted

    Hello Zeshan,

    After investigating this further, I determined that your requirement could be achieved by creating a new ExploreBarItem and adding this item to the Items collection of the parent. Afterwards the parent should be added to the Items collection of the group:

    ExplorerBarGroup group = new ExplorerBarGroup();

            group.Text = "Drives";

            this.WebExplorerBar1.Groups.Add(group);

            ExplorerBarItem item = new ExplorerBarItem();

            item.Text = "C:";

            ExplorerBarItem subItem = new ExplorerBarItem();

            subItem.Text = "Program Files";

            item.Items.Add(subItem);

            group.Items.Add(item);

           

    Below I am attaching a sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

    WebExplorerBar.zip

Reply Children
No Data