public override void ToUControl(UControl container, WC.CommandEventHandler handler, string navigateUrl = null) { // see Controls TreeNavigatorControl tn = new TreeNavigatorControl(storedHierarchyData, actions); tn.ActionChosen += handler; container.Controls.Add(tn); }
public virtual void ToUControl(UControl container, WC.CommandEventHandler handler, string navigateUrl = null) { WC.Button button = new WC.Button(); button.Text = this.action.ToString(); button.CommandName = "_" + action.ToString(); button.Command += (WC.CommandEventHandler)handler; if (action == UserAction.Delete) { button.OnClientClick = "return confirm('Really?')"; } button.ID = "Control" + controlId; container.Controls.Add(button); }