The replacement for the retiring ultrawebtoolbar is the webdatamenu but I can't find any samples or examples or any information about how to achieve this. I have a very simple toolbar with two dropdownlists and a button. Do you have any suggestions as to how I can create a menu with these controls embedded and be able to access the controls in the code behind. I tried creating templates but then couldn't see them in the code behind. I don't know whether the templates need to be created using a class (as in the webdatagrid templated columns) or whether to access the control using findcontrol (as in the webexplorer). Is there any migration documentation to indicate how this can be achieved?
Thanks
Andy
BTW I love the term 'sunset policy'...
Hello jcad,
The attached sample (WebDataMenu.zip) demonstrates how to set up a WebDataMenu with two dropdown lists and a button. Using a template means that each instance of the dropdowns are generated dynamically, thus their Client IDs are generated as the page loads. This is why you couldn't see them in the code behind. The only way to find them is to search through the controls and differentiate them by their client IDs, which is demonstrated in Default.aspx.cs.
I had to cut out the ig_res folder to reduce the filesize low enough for attaching. You can add those to the sample on your end to view everything properly.
If you have any further questions, please let me know.
My existing application creates the controls in code and add them to the toolbar so I want to create the controls and add them to the templates:
chkShowDescendantRecords = New CheckBox With chkShowDescendantRecords .AutoPostBack = True .CssClass = CssClass.ToolBarCheckBox .ID = "chkShowDescendantRecords" .Text = "Show Descendant Records" .LabelAttributes.Add("hideFocus", "true") .Checked = GetSessionBoolean(SessionVariable.ExplorerShowDescendants) End With WebDataMenu1.Templates.Item(0).Controls.Add(chkShowDescendantRecords)
The code runs ok but the checkbox control does not appear in the webdatamenu.
Is there away to get this to work?
Hello,
Please let me know if the sample proved helpful or if you need further assistance with this issue.