AS Web Forms : Component Reference : ASDataEditor Class : Templates : Menu : Disable Menu Buttons
Sometimes, you may want to disable a button in the menu when you are on the edit screen, or enable a button when you are on the search screen. This is done my setting attributes on the button in the DataEditor's Menu Item Template. This is done in the ASPX / ASCX page.
In each button's HTML tag, you may add an attribute called "AlwaysEnable" to true to always have the button enabled regardless of the screen. Legitimate values are:
AlwaysEnable="True"
There is also an attribute called "ManualEnable" which may be set to true or false.
Both attributes may also be set programmatically using the standard ASP.NET attribute syntax. For Example:
CType(Mypage.helper.GetControl(ctlASDataEditor,"cmdButton"), System.Web.UI.HtmlControls.HtmlInputButton).Attributes("ManualEnable").Disabled = True OR
CType(Mypage.helper.GetControl(ctlASDataEditor,"cmdButton"), System.Web.UI.HtmlControls.HtmlInputButton).Attributes("ManualEnable").Disabled = False
Note that to use the syntax above, you must have put a default value in the attribute in the ASCX. Otherwise, you will need to use the Attributes.Add method to set it up first.