Hello,
i use VS 2010 Prof. with Infragistics Version=12.2.20122.2014 in a .Net 4.0 App. I use the Explorer Bar as a 'Menu' for the selection of different layeres in a map and for Routing, so the user must edit some text and i Need some Buttons in this 'group'. To solve this Problem i use some templates that i load if the Group expanded. In an other Project i use a database-table to store the menu-structure and load the data via the hierarchical datasource. This is a very dynamic way, since i can Change the menu very easy (new entry in the table means new Topic in the menu). But is there a way to bind templates dynamically to the Explorer Bar via the hierachical datasource? Are there any examples??
Thank's
Patric
Hi Patric,
I am currently looking into this for you. I need some time to research this and I will have another update with more information or questions for you by Monday.
If you have any further questions with this, please let me know.
It is possible to specify some value in your data to flag a need for the template. When binding the item, you could handle the ItemBound event and check for this flag and then assign the correct template.
I have attached a sample that demonstrates this using an XMLDataSource. If you need further assistance with this, please let me know and I will be glad to help.
Hello Michael,
thank's for your sample, it's a part solution and Show me, that i was not exact enough. With your solution, i can bind a static template to an Item or Group. But is there a way to load and bind the templates from the code behind, for example there is one Hierarchie of items in my database with the Need for Radio Buttons and one for checkboxes. At the Moment i build the template static in the aspx-page and set the template id of a static Explorer bar Group. But i Need a dynamic loading from the database.
Any idea??
Thanks
Could you please help me better understand why you need to dynamically create the templates at runtime rather than statically? In my sample, I assign the TemplateID of a static template to dynamically bound items using a property in the database. Does your database contain the layout code that would need to be used in the template? Are you looking to build and add the template to the WebExplorerBar's template collection only if a hierarchy of items needs the template?
Looking forward to hearing from you.
Please let me know how I can assist you further with this issue.