Class Menu
Represents the Menu UI element.
Implements
Inherited Members
Namespace: Syncfusion.JavaScript.Web
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class Menu : CommonDataBoundControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
Menu()
Declaration
public Menu()
Properties
AnimationType
Gets or sets the animation type.
Declaration
public AnimationType AnimationType { get; set; }
Property Value
Type | Description |
---|---|
AnimationType | The animation type. |
Child
Menu child as Inner property, which help us to bind the data sources from data adaptors to child items
Declaration
public MenuChildDataFields Child { get; set; }
Property Value
Type | Description |
---|---|
MenuChildDataFields |
ClientSideOnBeforeContextOpen
Occurs before context menu gets open.
Declaration
public string ClientSideOnBeforeContextOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side onbefore context menu open. |
ClientSideOnClick
Occurs when mouse click on menu items.
Declaration
public string ClientSideOnClick { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on click. |
ClientSideOnContextClose
Occurs when context menu on close.
Declaration
public string ClientSideOnContextClose { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on context menu close. |
ClientSideOnContextOpen
Occurs when context menu on open.
Declaration
public string ClientSideOnContextOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on context menu open. |
ClientSideOnCreate
Occurs when create menu items
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on create. |
ClientSideOnDestroy
Occurs when destroy menu items.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on destroy. |
ClientSideOnKeyDown
Occurs when key down on menu items.
Declaration
public string ClientSideOnKeyDown { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on key down. |
ClientSideOnMouseOut
Occurs when mouse out from menu items.
Declaration
public string ClientSideOnMouseOut { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on mouse out. |
ClientSideOnMouseOver
Occurs when mouse over the Menu items.
Declaration
public string ClientSideOnMouseOver { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side on mouse over. |
ClientSideOnOverflowClose
Occurs when overflow popup menu closes.
Declaration
public string ClientSideOnOverflowClose { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side overflow close. |
ClientSideOnOverflowOpen
Occurs when overflow popup menu opens.
Declaration
public string ClientSideOnOverflowOpen { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side overflow open. |
Container
Gets or sets the sub menu target.
Declaration
public string Container { get; set; }
Property Value
Type | Description |
---|---|
System.String | The sub menu target. |
ContextMenuTarget
Gets or sets the context menu target.
Declaration
public string ContextMenuTarget { get; set; }
Property Value
Type | Description |
---|---|
System.String | The context menu target. |
CssClass
Gets or sets the css class.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The css class. |
DataBindings
Gets the list of data for performing data binding in Menu
Declaration
public List<MenuBinding> DataBindings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<MenuBinding> |
DataHtmlAttributeField
Gets or sets the menu data html attribute field.
Declaration
public string DataHtmlAttributeField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data html attribute field. |
DataIdField
Gets or sets the menu data id field.
Declaration
public string DataIdField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data id field. |
DataImageAttributeField
Gets or sets the menu data image attribute field.
Declaration
public string DataImageAttributeField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data image attribute field. |
DataImageUrlField
Gets or sets the menu data image url field.
Declaration
public string DataImageUrlField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data image url field. |
DataLinkAttributeField
Gets or sets the menu data link attribute field.
Declaration
public string DataLinkAttributeField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data link attribute field. |
DataManager
Data Manager as Inner property, which help us to bind the data sources from data adaptors
Declaration
public DataSource DataManager { get; set; }
Property Value
Type | Description |
---|---|
DataSource |
DataParentIdField
Gets or sets the menu data parent id field.
Declaration
public string DataParentIdField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data parent id field. |
DataSource
Gets or sets the object values of datamanager and JSON from the data bound control.
Declaration
public object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The data source. |
DataSourceCachingMode
Gets or sets the datasource caching mode.
Declaration
public DataSourceCachingMode DataSourceCachingMode { get; set; }
Property Value
Type | Description |
---|---|
DataSourceCachingMode | The datasource caching mode |
DataSpriteCssField
Gets or sets the menu data sprite css class field.
Declaration
public string DataSpriteCssField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data sprite css class field. |
DataTextField
Gets or sets the menu data text field.
Declaration
public string DataTextField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data text field. |
DataUrlField
Gets or sets the menu data url field.
Declaration
public string DataUrlField { get; set; }
Property Value
Type | Description |
---|---|
System.String | The data url field. |
EmptyDataText
Gets or sets the empty data text.
Declaration
public string EmptyDataText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The empty data text. |
EnableAnimation
Gets or sets a value indicating whether [enable EnableAnimation].
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableCenterAlign
Gets or sets a value indicating whether [enable EnableCenterAlign].
Declaration
public bool EnableCenterAlign { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Enabled
Gets or sets a value indicating whether the Web server control is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRTL
Gets or sets a value indicating whether [enable RTL].
Declaration
public bool EnableRTL { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableSeparator
Gets or sets a value indicating whether [enable EnableSeparator].
Declaration
public bool EnableSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ExcludeTarget
Gets or sets the exclude target.
Declaration
public string ExcludeTarget { get; set; }
Property Value
Type | Description |
---|---|
System.String | The exclude target. |
Fields
Gets the fields of Menu from the model
Declaration
public MenuFields Fields { get; }
Property Value
Type | Description |
---|---|
MenuFields |
Height
Gets or sets the height.
Declaration
public override Unit Height { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.Unit | The height. |
IsResponsive
Gets or sets a value indicating whether [IsResponsive].
Declaration
public bool IsResponsive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Items
Represents the Menu items
Declaration
public List<MenuItem> Items { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<MenuItem> |
Locale
Gets or sets the Locale template.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Locale. |
MenuType
Gets or sets the menu type
Declaration
public MenuType MenuType { get; set; }
Property Value
Type | Description |
---|---|
MenuType | The menu type. |
Model
Gets or sets the Menu properties to its model.
Declaration
public MenuProperties Model { get; set; }
Property Value
Type | Description |
---|---|
MenuProperties |
OpenOnClick
Gets or sets a value indicating whether [enable OpenOnClick].
Declaration
public bool OpenOnClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Orientation
Gets or sets the orientation.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation | The orientation. |
OverflowHeight
Gets or sets the popup menu height.
Declaration
public Unit OverflowHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.Unit | The overflowheight. |
OverflowWidth
Gets or sets the popup menu width.
Declaration
public Unit OverflowWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.Unit | The overflowwidth. |
Query
Gets or sets the query.
Declaration
public string Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | The query. |
ShowRootLevelArrows
Gets or sets a value indicating whether [enable ShowRootLevelArrows].
Declaration
public bool ShowRootLevelArrows { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowSubLevelArrows
Gets or sets a value indicating whether [enable ShowSubLevelArrows].
Declaration
public bool ShowSubLevelArrows { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SubMenuDirection
Gets or sets the sub menu direction.
Declaration
public Direction SubMenuDirection { get; set; }
Property Value
Type | Description |
---|---|
Direction | The sub menu direction. |
TableName
Gets or sets the name of the table.
Declaration
public string TableName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the table. |
TitleText
Gets or sets the Title text.
Declaration
public string TitleText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Title text |
Width
Gets or sets the width.
Declaration
public override Unit Width { get; set; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.Unit | The width. |
Methods
DataBind(IEnumerable, DataSourceView)
Gets or sets a value indicating whether [data bind].
Declaration
public bool DataBind(IEnumerable dataSource, DataSourceView dsView)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | dataSource | The dataSource. |
System.Web.UI.DataSourceView | dsView | The datasource view. |
Returns
Type | Description |
---|---|
System.Boolean |
|
DependentScripts()
Represents the dependent scripts for Menu control.
Declaration
public List<string> DependentScripts()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | This method returns the list of dependent script files which is of type string |
FetchData(IEnumerable)
Fetching the data
Declaration
public override void FetchData(IEnumerable data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | data |
Overrides
FindItem(String)
Represents the method which is used to find the item
Declaration
public MenuItem FindItem(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier |
Returns
Type | Description |
---|---|
MenuItem | This method returns the object value |
GetDefaultDataBinding(Object)
get the default data binding.
Declaration
public MenuBinding GetDefaultDataBinding(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item. |
Returns
Type | Description |
---|---|
MenuBinding | This method returns menu binding value |
GetDependentFiles()
Get the dependent files for Menu control
Declaration
public override List<string> GetDependentFiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Overrides
GetFieldPropertyValue(String, PropertyDescriptorCollection, Object)
gets the field property value.
Declaration
protected string GetFieldPropertyValue(string sAttrName, PropertyDescriptorCollection propCollection, object oEnumerableItem)
Parameters
Type | Name | Description |
---|---|---|
System.String | sAttrName | The Attribute Name. |
System.ComponentModel.PropertyDescriptorCollection | propCollection | The property collection. |
System.Object | oEnumerableItem | The oEnumerableItem. |
Returns
Type | Description |
---|---|
System.String |
GetMenuItem(List<MenuItem>, String)
Represents the method which is used to get the menu item
Declaration
protected MenuItem GetMenuItem(List<MenuItem> list, string ID)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<MenuItem> | list | The list of menu items |
System.String | ID | The identifer |
Returns
Type | Description |
---|---|
MenuItem | This method returns the value based on the list count |
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
Type | Name | Description |
---|---|---|
System.Object | state |
Overrides
PerformDataBinding(IEnumerable)
Binds data from the data source to the control.
Declaration
protected override void PerformDataBinding(IEnumerable retrievedData)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | retrievedData |
Overrides
PostBackEventHandler(String, Dictionary<String, Object>)
Gets a value that indicates whether the page is being loaded in response to a postback.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
Type | Name | Description |
---|---|---|
System.String | EventName | |
System.Collections.Generic.Dictionary<System.String, System.Object> | args |
Overrides
Render()
Render this instance
Declaration
public string Render()
Returns
Type | Description |
---|---|
System.String |
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer |
Overrides
SaveViewState()
Saves any server control view-state changes that have occurred since the time the page was posted back to the server.
Declaration
protected override object SaveViewState()
Returns
Type | Description |
---|---|
System.Object |
SetupItemBindingData(MenuItem, MenuBinding, Object)
set up item binding data.
Declaration
public virtual void SetupItemBindingData(MenuItem menuItem, MenuBinding menuBinding, object oEnumerableItem)
Parameters
Type | Name | Description |
---|---|---|
MenuItem | menuItem | The menu Item. |
MenuBinding | menuBinding | The menu Binding. |
System.Object | oEnumerableItem | The oEnumerableItem. |
UpdateServerModel(Dictionary<String, Object>)
Maintaining viewstate model values on post back
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | ClientModel |
Overrides
Events
ItemClick
Occurs when [item click].
Declaration
public event Menu.MenuEventHandler ItemClick
Event Type
Type | Description |
---|---|
Menu.MenuEventHandler |