At a glance

Telerik RadMenu v4.4 Send comments on this topic.
At a glance

Glossary Item Box

New major version of RadMenu is now available as a part of RadControls for ASP.NET Ajax. Its new architecture is based on top of the ASP.NET AJAX framework to directly benefit from client-side behaviors and capabilities. We strongly recommend using the new version for all new development.

Thank you for choosing Telerik RadMenu!

Telerik RadMenu v4.4 is the "all-in-one" menu component for ASP.NET.

Key Features

Telerik RadMenu allows you to build every possible menu type:

  • drop-down menus and context menus
  • multi-row, vertical, hierarchical or scrollable menus

You can virtually customize the appearance and behavior of your menus in all possible ways. (For more information, see Skins and Expand and Collapse Behavior.)

Telerik RadMenu v4.4 fully supports binding to various data sources, so you can easily populate your menu with only a few lines of code.

New to Telerik RadMenu?

Familiar with Telerik RadMenu?

ASP.NET Support

The product is compiled to work with both ASP.NET 1.x and ASP.NET 2.0 frameworks. The ASP.NET 2.0 version of Telerik RadMenu natively supports all the benefits of the new framework and the new Visual Studio 2005:

  • .NET 2.0 Themes;
  • Declarative datasources in ASP.NET 2.0
  • Smart Tags.

With Telerik RadMenu, you can fully use the convenience of the Visual Studio .NET design-time surface.

This manual also contains information about the following:

  • Installation and Deployment

  • Standards compliance

  • Structure and appearance

  • Telerik RadMenu Client-Side Model
  • API Reference (Server-Side)

If you need further assistance, please contact clientservice@telerik.com

Revised: 4/15/2008

© 2002-2008 Telerik. All Rights Reserved.


What's new

Telerik RadMenu v4.4 Send comments on this topic.
What's new
See Also

Glossary Item Box

What's new in Telerik RadMenu v4.4 (part of Telerik RadControls for ASP.NET Q2 2007)

  • When RadMenu is bound to SiteMapDataSource the menu item corresponding to the current site map node is automatically highlighted
  • Scrolling of the root item group in context menu mode
  • Scrolling for second level items
  • New skins

What's new in Telerik RadMenu v4.3 (part of Telerik RadControls for ASP.NET Q1 2007)

The current version features numerous bug fixes and performance optimizations.

What's new in Telerik RadMenu v4.2 (part of Telerik RadControls for ASP.NET Q4 2006)

  1. Seamless interoperability with ASP.NET AJAX Release Candidate
  2. Full compatibility with Visual Studio .NET 2005 Service Pack 1 and ASP.NET Web Application Project template
  3. New client-side events are now added:
  • OnClientContextShowing
  • OnClientContextShown
  • OnClientContextHiddenz

What's new in Telerik RadMenu v4.0 (part of Telerik RadControls for ASP.NET Q2 2006)

This topic outlines the new functionality in Telerik RadMenu v4.0. For a list of changes and backward compatibility issues, see Changes And Backward Compatibility.

Note that Telerik RadMenu v4.0 is not backward compatible with previous versions. The presented changes are due to numerous improvements and great enhancements in the current version.
  1. Semantic rendering for 70% less markup

    Telerik RadMenu now implements a highly efficient semantic rendering, which uses list items and CSS instead of tables. As a result the HTML output is reduced by up to 70%, which dramatically improves performance. Furthermore, there is no CPU-freeze effect associated with client-side generated controls.
  2. Search engine friendly

    Although it is JavaScript-based, Telerik RadMenu completely follows the principles of Search Engine Optimization. The control's innovative rendering generates semantic lists and standard <a> tags, which are properly recognized and highly valued by search engines. As a result, all content accessible through this control will be automatically indexed and ranked with no extra effort required on the side of the developer.

  3. Embedded Web Resources in ASP.NET 2.0

    Embedded Web Resources are implemented for a very easy and convenient deployment. The only thing you now need to do is drag r.a.d.menu from your toolbox onto your web page (no external files will be required). The /RadControls folder will only be needed if you plan to use a skin other than the default one or if you make any modifications to the script files.

  4. Easier grouping of items

    the Telerik RadMenu hierarchy structure has been significantly simplified so that each menu item can now have its own collection of child items. This eliminates the need of forming menu groups so the MenuGroup class is removed.

  5. Richer client-side API

    The client-side API is now extended and closely matches the server-side API.

  6. Improved skinning

    Telerik RadControls for ASP.NET suite is now shipped with a consistent set of skins that allow you to easily build slick interfaces with the look-and-feel of Windows XP, Office, Visual Studio, etc. The skin of every control can be easily switched using a single property.

  8. Enhanced design-time support

    The design-time functionality of Telerik RadMenu now includes:
    1. applying skins in design time
    2. new Builder dialog

    3. Enlarge Click to enlarge
    4. Easy switch between Telerik RadMenu skins - the AutoFormat command in Telerik RadMenu Smart tag automatically detects the preset skins
    5. Design-time support for declarative data sources
    6. Hierarchical binding to flat data sources

  9. Enhanced support for ASP.NET 2.0 declarative data sources

    AccessDataSource, SqlDataSource, and ObjectDataSource are now supported.

Previous versions:

v3.7

Telerik RadMenu supports Atlas .

v3.6 (part of Telerik RadControls for ASP.NET Q4 2005)

Full support for ASP.NET 2.0, enhanced design-time support (smart tags for VS 2005), declarative data sources.

v3.5 (part of Telerik RadControls for ASP.NET Q3 2005)

Complete XHTML and accessibility compliance (level AAA).

v3.0 (part of Telerik RadControls for ASP.NET Q2 2005)

Support for:

  1. Content templates
  2. Visual Studio design time
  3. Keyboard shortcuts
  4. Themes
  5. Screen boundary direction
  6. Data binding: native .NET connectivity with various sources, such as DataSets, DataTables and XML documents
  7. Static (pinned) menus
  8. Image preloading and caching

See Also

Key features
Changes and backward compatibility

© 2002-2008 Telerik. All Rights Reserved.


Which license should I use or purchase

Telerik RadMenu v4.4 Send comments on this topic.
Which license should I use or purchase
See Also
Licensing > Which license should I use or purchase

Glossary Item Box

Telerik offers several different packages for you to choose from:

Trial licenses

Description

If you are a first-time Telerik user, it would be best to create an account in our Client.NET extranet (www.telerik.com/Clientnet) and download a Trial license. The Trial licenses are fully-functional and are identical in functionality to the paid versions. Review the Which file do I need to install? section for further instructions.

Support

A trial license comes with the Bronze Support package, which guarantees a 72-hour response time from the Telerik support staff on business days (Monday thru Friday) when the Online Support Ticketing System is used. Mail queries usually take longer to respond.

For more information, review the available Support Options.

Single Developer licenses

Description

A Developer license is granted per developer seat: one developer is allowed to work with the product per license. Developer licenses have no run-time limitations and allow the usage of all Telerik controls in an UNLIMITED number of custom web applications. The controls can be installed on more than one machine as long as only the licensed developer is using the product.

License Keys

Developer licenses come with special builds that work without keys and allow the developer to safely access web applications that use Telerik products. To update your application from a trial license to a Developer license, please review the instructions in the following section: Trial License v3.x to Developer License v4.x

Support

The Single Developer license comes with the Silver Support package which guarantees a 48 hour response time from the Telerik support staff on business days (Monday thru Friday) when the Online Support Ticketing System is used.
Mail queries usually take longer to respond.

For more information, review the available Support Options.

Single Developer Subscription license

Description

Unlike the Single Developer license, Single Developer Subscription license offers a Subscription. A Subscription license entitles you to receive, for free, all released updates and new products for the duration of one year from the date of purchase. This license is the easiest and most cost-effective way to ensure that you are using the latest versions of our products. With the Subscription license you save more than 70% on Telerik products if purchased separately.

The Single Developer Subscription license is offered for the Telerik RadControls for ASP.NET suite only. Subscriptions are not available for individual products at this time.

You can renew your subscription at approximately 50% of the original price. You will be promptly notified when the Subscription license is about to expire.

All RadControls for ASP.NET subscription holders are entitled to a license to RadControls "Prometheus" suite.

License Keys

The Developer license comes with a special build that work without keys and allow the developer to safely access web applications that use Telerik products. To update your application from Trial to a Developer license, please review the instructions in the following section: Trial License v3.x to Developer License v4.x

Support

The Single Developer Subscription license comes with the Gold Support package which guarantees a 24 hour response time from the Telerik support staff on business days (Monday thru Friday) when the Online Support Ticketing System is used.
Mail queries usually take longer to respond.

For more information, review the available Support Options.

Telerik maintains a public Product Roadmap, which will give you details on the upcoming products and versions for the next quarter. This guarantees that you see a good return on your investment in the Subscription license.

Source Code license

Description

The Source Code license is an excellent investment if you need to customize our controls to fit a specific requirement, or if your company wishes to own the source code for all products used.

A Source Code license is offered with purchases of five or more Single Developer or Single Developer Subscription licenses for Telerik RadControls for ASP.NET suite. If you have opted for the Subscription license, you will be receiving the source codes for all products released within one year from the date of purchase.

Source Code licenses are offered for the Telerik RadControls for ASP.NET suite only and are not available for individual products at this time.

Support

The Source Code license comes with the Gold Support package, which guarantees a 24 hour response time from the Telerik support staff on business days (Monday thru Friday) when the Online Support Ticketing System is used. All questions from Source code licensees are treated with priority.

For more information, review the available Support Options.

Custom Source Code modifications are not supported by Telerik.

Discounts Offered

Telerik offers the following volume discounts on all licenses:

  • 3 to 4 licenses - 10%
  • 5 to 9 licenses - 20%
  • 10 to 19 licenses - 30%
  • 20 or more - 40%

Telerik also offers discounts to qualified educational, non-profit, charity and government entities. For more information on how to qualify for a discount, visit our Special pricing page.

See Also

Sales FAQ page
Purchase Online
Support Options
Support FAQ
Client.Net FAQ
License Agreement

© 2002-2008 Telerik. All Rights Reserved.


License Agreement

Telerik RadMenu v4.4 Send comments on this topic.
License Agreement
Licensing > License Agreement

Glossary Item Box

Telerik End-User License Agreement

By purchasing, installing, or otherwise using the product identified above and/or its related materials, you agree to be bound by the terms and conditions of this License Agreement. Check the box "I have read and agree to the License Agreement" if you agree.

IMPORTANT – READ CAREFULLY: This license agreement ("LICENSE") is a legal agreement between you (either an individual or a single entity, also referred to as "LICENSEE", "YOU") and Telerik Corp., ("TELERIK"), for the software containing this LICENSE which may also include the software’s source code written in a high-level computer language, associated media, printed materials, and "online" or electronic documentation (collectively referred to as “SOFTWARE”).

Any earlier license we may have granted to you for the use of earlier versions of the SOFTWARE is replaced by this LICENSE.

SOFTWARE PRODUCT LICENSE

The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties and contains confidential information and trade secrets. TELERIK retains all rights not expressly granted to you in this LICENSE.

I. GRANT OF LICENSE

TELERIK hereby grants to you, and you accept, a non-exclusive, non-transferable license to install, copy, use and modify the SOFTWARE only as authorized below.

This license grants you no rights to the "2007 Microsoft Office System User Interface". For appropriate license, please, contact Microsoft directly.

1. TRIAL LICENSE

You are granted a license for evaluation purposes only. You are authorized to install, copy, and use the SOFTWARE for the sole purpose of testing its functionality. You are not allowed to integrate it in end products or use it for any commercial purpose.

2. DEVELOPER LICENSE

The SOFTWARE is licensed per Developer seat. This means that each individual using or otherwise accessing the SOFTWARE for development purposes must obtain the right to do so by purchasing an individual product license.

You may make copies on more than one computer, as long as the use of the SOFTWARE is by the same licensed developer. The SOFTWARE is in "use" on a computer when it is loaded into temporary memory (i.e. RAM) or installed into permanent memory (e.g. hard disk or other storage device) of that computer for development purposes. If you install the SOFTWARE on a network server for the sole purpose of internal distribution among licensed developers this is not considered “use” of the SOFTWARE.

2-1. Redistribution rights:

All product licenses are perpetual and royalty-free. You can ship the SOFTWARE as part of solutions for internal company use, hosted applications, commercial solutions deployed at end-users’ sites or shrink-wrapped software (PACKAGED PRODUCTS) in which the SOFTWARE is integrated.

You may distribute the SOFTWARE provided that:

  • You reasonably ensure that the SOFTWARE is not distributed in any form that allows it to be reused by any application other than your solution. Technical guidelines will be provided upon request, please contact support@telerik.com for more details.
  • You need to duly inform your customers that they are not allowed to use the SOFTWARE independently from your solution. For use of the SOFTWARE in design-time (i.e. within a development environment such as Microsoft Visual Studio) your customers need to purchase the appropriate number of Developer Licenses from TELERIK.
  • You need to include a valid copyright message in your solution in a location viewable by the end-users (e.g. "About" box).

2-2. Silver Support:

As part of your license you are entitled to "Silver" Support Package which guarantees response within 48 hours.

3. DEVELOPER LICENSE PLUS SUBSCRIPTION AND SOURCE CODE LICENSE

You are granted 1 (one) Developer License as defined above. In addition you are entitled to a 1 Year Subscription, Source Code and Gold Support Package.

3-1. Subscription

You are entitled to receive all version updates for the SOFTWARE for a period of 1 (one) year.

  • 3-2. Source Code

    As part of the DEVELOPER PLUS SUBSCRIPTION AND SOURCE CODE LICENSE you are granted the right to view and modify the SOFTWARE's source code only as authorized below:
  • The SOFTWARE's source code is provided to the licensed developer for the sole purposes of education and troubleshooting. The SOFTWARE's source code cannot be used as a basis of development of derivative works or other software products.
  • Under no circumstances may any portion of the SOFTWARE’s source code or any modified version of the source code be distributed, disclosed or otherwise made available to any third party.
  • TELERIK DOES NOT provide technical support for modified source code.
  • The SOFTWARE’s source code is provided as is. Refunds are not available for licenses that include source code.
  • In the event you develop any troubleshooting-related modifications of the SOFTWARE, either independently or jointly with TELERIK, such modifications and all rights associated therewith will be the exclusive property of TELERIK. You are granted the right to use such modifications as set forth in this agreement.
  • You acknowledge that the SOFTWARE’s source code contains valuable and proprietary trade secrets of TELERIK. All individuals employed by or belonging to your entity agree to expend every effort to insure its confidentiality. You agree to assume full responsibility for such employees’ or contractors’ use, or misuse, of such disclosed source code as if it was your use. These obligations shall not apply to any information generally available to the public, independently developed or obtained without reliance on TELERIK information, or approved in writing for release by TELERIK without restriction.

3-3. Gold Support:

As part of your license you are entitled to "Gold" Support Package which guarantees response within 24 hours.

II. OTHER RIGHTS AND LIMITATIONS

  • At no time may the SOFTWARE be used for development purposes by other individuals than the licensed developer(s).
  • The SOFTWARE may not be distributed for use with solutions or PACKAGED PRODUCTS other than those developed by you.
  • The SOFTWARE may not be distributed part of products that have the same or substantially the same primary functionality. (Example for RadControls for ASP.NET: you may purchase Telerik RadEditor for ASP.NET and create a blog application/component. However, you cannot wrap RadMenu and offer it as a SharePoint WebPart or DNN menu skin object, since its primary functionality would be substantially the same as the SOFTWARE.
  • You are not allowed to resell, transfer, rent, lease, or sublicense the SOFTWARE and your associated rights. Under no circumstances shall you grant further redistribution rights to the end-users of your solution.
  • You may not use the TELERIK product names, logos or trademarks to market YOUR SOFTWARE.
  • You are not allowed to disassemble, decompile or "unlock", decode or otherwise reverse translate or engineer, or attempt in any manner to reconstruct or discover any source code or underlying algorithms of SOFTWARE provided in object code form only.
  • You are not allowed to use, copy, modify, or merge copies of the SOFTWARE and any accompanying documents except as permitted in this LICENSE.
  • You agree to indemnify, hold harmless, and defend TELERIK and its resellers from and against any and all claims or lawsuits including attorney's fees that arise or result from the use or distribution of YOUR SOFTWARE

III. DELIVERY

TELERIK shall deliver to LICENSEE a master copy of the SOFTWARE licensed hereunder in electronic files only. Documentation shall also be provided in electronic format.

IV. UPGRADES

You are eligible for free minor upgrades (e.g. v.1.5 to v.1.8), patches, and bug-fixes for the SOFTWARE, including source code if applicable. SOFTWARE labeled as an upgrade replaces and/or supplements (and may disable) the product that formed the basis for your eligibility for the upgrade. You may use the resulting upgraded product only in accordance with the terms of this LICENSE.

If you have purchased a "DEVELOPER PLUS SUBSCRIPTION AND SOURCE CODE LICENSE” you are entitled to receive all version updates for the SOFTWARE period of 1 (one) year.

V. TERMINATION

This LICENSE shall last as long as you use the SOFTWARE in compliance with this LICENSE. TELERIK may terminate this LICENSE if you fail to comply with any of the terms and conditions herein. In such event you agree to remove and destroy all copies of the SOFTWARE and any applicable source code.

TELERIK reserves the right to discontinue at any time any product, shall it be offered individually or as a part of a product SUITE. However, TELERIK is obligated to provide the proper level of support for all discontinued products for a period of 1 (one) year after the date of discontinuance.

VI. COPYRIGHT

All title and copyrights in and to the SOFTWARE (including but not limited to any images, photographs, animations, video, audio, music, text, incorporated into the SOFTWARE), the accompanying printed materials, and any copies of the SOFTWARE, and any trademarks or service marks of TELERIK are owned by TELERIK. All title and intellectual property rights in and to the content that may be accessed through use of the SOFTWARE is the property of the respective content owner and may be protected by applicable copyright or other intellectual property laws and treaties. This LICENSE grants you no rights to use such content.

VII. LIMITED WARRANTY

TELERIK warrants solely that the SOFTWARE will perform substantially in accordance with the accompanying written materials for a period of ninety (90) days. TELERIK does not warrant the use of the SOFTWARE will be uninterrupted or error free at all times and in all circumstances, nor that program errors will be corrected. This limited warranty shall not apply to any error or failure resulting from (i) machine error, (ii) LICENSEE's failure to follow operating instructions, (iii) negligence or accident, or (iv) modifications to the SOFTWARE by any person or entity other than TELERIK. In the event of a breach of warranty, LICENSEE 's sole and exclusive remedy, is repair of all or any portion of the SOFTWARE. If such remedy fails of its essential purpose, LICENSEE 's sole remedy and TELERIK's maximum liability shall be a refund of the paid purchase price for the defective SOFTWARE only. This limited warranty is only valid if TELERIK receives written notice of breach of warranty within thirty days after the warranty period expires.

VIII. LIMITATION OF LIABILITY

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL TELERIK BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE THE PRODUCT, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. IN ANY CASE, TELERIK'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS AGREEMENT SHALL NOT EXCEED IN THE AGGREGATE THE SUM OF THE LICENSE FEES LICENSEE PAID TO TELERIK FOR THE PRODUCT GIVING RISE TO SUCH DAMAGES, NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT BE APPLICABLE. TELERIK IS NOT RESPONSIBLE FOR ANY LIABILITY ARISING OUT OF CONTENT PROVIDED BY LICENSEE OR A THIRD PARTY THAT IS ACCESSED THROUGH THE PRODUCT AND/OR ANY MATERIAL LINKED THROUGH SUCH CONTENT. ANY DATA INCLUDED IN A PRODUCT UPON SHIPMENT FROM TELERIK IS FOR TESTING USE ONLY AND TELERIK HEREBY DISCLAIMS ANY AND ALL LIABILITY ARISING THEREFROM. THE EXTENT OF TELERIK'S LIABILITY FOR THE LIMITED WARRANTY SECTION SHALL BE AS SET FORTH THEREIN.

IX. MISCELLANEOUS

This License will be governed by the law of the State of Massachusetts, U.S.A. If any provision of this LICENSE is to be held unenforceable, such holding will not affect the validity of the other provisions hereof. Failure of a party to enforce any provision of this LICENSE shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision.

This License represents the entire understanding between the parties with respect to its subject matter.

YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, THAT YOU UNDERSTAND THIS AGREEMENT, AND UNDERSTAND THAT BY CONTINUING THE INSTALLATION OF THE SOFTWARE PRODUCT, BY LOADING OR RUNNING THE SOFTWARE PRODUCT, OR BY PLACING OR COPYING THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE, YOU AGREE TO BE BOUND BY THIS AGREEMENT'S TERMS AND CONDITIONS. YOU FURTHER AGREE THAT, EXCEPT FOR WRITTEN SEPARATE AGREEMENTS BETWEEN TELERIK AND YOU, THIS AGREEMENT IS A COMPLETE AND EXCLUSIVE STATEMENT OF THE RIGHTS AND LIABILITIES OF THE PARTIES.

© 2002-2008 Telerik. All Rights Reserved.


System requirements and browser support

Telerik RadMenu v4.4 Send comments on this topic.
System requirements and browser support
Installation and deployment > Installation > System Requirements > System requirements and browser support

Glossary Item Box

System Requirements

The following page describes the system requirements needed by Telerik RadControls for ASP.NET:

http://www.telerik.com/support/requirements-and-compliance/system-requirements.aspx

Browser Support

The following page shows all browsers and versions supported by Telerik RadControls for ASP.NET:

http://www.telerik.com/support/requirements-and-compliance/browser-support.aspx

Browser Limitations

The following article explains the browser limitations and what implications they have on Telerik RadControls for ASP.NET:

http://www.telerik.com/support/browser-support/browser-issues.aspx

Files and folders needed by Telerik RadMenu and Telerik RadControls for ASP.NET to function

The following section explains the files and folders needed to be used in your application in order for Telerik RadControls for ASP.NET to function properly:

Files and folders needed by Telerik RadControls for ASP.NET

© 2002-2008 Telerik. All Rights Reserved.


Which file do I need to install?

Telerik RadMenu v4.4 Send comments on this topic.
Which file do I need to install?
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Which file do I need to install?

Glossary Item Box

Telerik offers you the following ways to install Telerik RadMenu:

  • as an individual install, or
  • as part of the complete Telerik RadControls for ASP.NET suite.

If you plan to use only Telerik RadMenu in your project, we recommend that you install Telerik RadMenu only. In case you want to use two or more products from the Telerik RadControls for ASP.NET suite, it is probably better to install the full Telerik RadControls for ASP.NET suite.

Each installation package comes in three types:

  • EXE file for automatic installation;
    The EXE files are intended for easy and automatic installation of a product. It installs the control(s) on your computer in a folder in your Program Files named Telerik, and automatically creates the necessary virtual folders and projects. Additionally, the EXE installs the help file(s) in your VS.NET IDE and in your local copy of MSDN (if you have one). The EXE files are best for first-time Telerik users and ASP.NET novices.
  • ZIP file for manual (advanced) installation;
    The ZIP is used for manual (advanced) installs and for upgrading/updating purposes. The folder structure is different from the EXE. You need to be familiar with with ASP.NET, IIS, setting permissions and creating virtual folders. Commonly, the ZIP is installed directly in inetpub/wwwroot. Use the ZIP file for installation on shared hosting.
  • DLL and Scripts only (a.k.a. HOTFIX) file for updating/upgrading a product to a newer version;
    This is a bare-bones upgrade option for our controls. The DLL and Scripts files contain only those files that you need to replace in your project to upgrade to the new version of a Telerik control. If you are already using a Telerik product and just want to update it, there is no need to download the complete suite - download the latest HOTFIX for the product and apply it.
The latest EXE and ZIP packages available for download already have all updates/HOTFIXES applied. There is no need to update them further.

If you already have a Telerik control installed from the EXE, you can safely install an updated version of the same control - the installer will keep your existing installation. The new files will be placed in a separate folder and the new installation does not damage the common installer files. The new Telerik RadMenu installation may have an updated help too: it is registered with the correct menu namespace. You can see the updated Telerik RadMenu help in your help2 viewer.

See Also

Installing the Telerik RadControls for ASP.NET suite from EXE file
Installing the Telerik RadControls for ASP.NET suite from ZIP file
Installing Telerik RadMenu from EXE file
Installing Telerik RadMenu from ZIP file
Using the 'DLL and Scripts only' file (HOTFIX)

© 2002-2008 Telerik. All Rights Reserved.


Installing the Telerik RadControls for ASP.NET suite from EXE file

Telerik RadMenu v4.4 Send comments on this topic.
Installing the Telerik RadControls for ASP.NET suite from EXE file
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Installing the Telerik RadControls for ASP.NET suite from EXE file

Glossary Item Box

The EXE files are intended for easy and automatic installation of a product. The EXE installs the suite on your computer to a folder named Telerik in your Program Files, automatically creating the necessary virtual folders and projects. Additionally, it installs the help file(s) in the VS.NET IDE and in your local copy of MSDN, if you have one installed.

The EXE files are best for first-time Telerik users and ASP.NET novices.

The latest package available for download already has all updates/HOTFIXES applied. There is no need to update it further.
The EXE installation will not overwrite previous Telerik RadControls for ASP.NET installations, unless it is of the same version.

Install with Internet Information Services (IIS) Running

To install Telerik RadControls for ASP.NET on your machine from the EXE file, follow the instructions below:

  1. Log into your Client.NET account.
  2. Go to My Licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadControls for ASP.NET.
  4. Go to the Download tab and download the Automatic installation (EXE) file.
  5. Once the download completes, run the RadControls EXE file and follow the instructions.

    The wizard will install the Telerik RadControls for ASP.NET component in the following folder unless you specify otherwise:
    C:\Program Files\Telerik\RadControlsQ1 2007.

The wizard will create the necessary virtual folders.

To view live examples of the Telerik RadMenu functionality, you can launch the Quick-Start Framework in either of the following ways:

  • Open Start Menu -> Programs -> Telerik -> RadControls Q1 2007 for ASP.NET -> ASP.NET 2.X -> RadControls Q1 2007 C#/VB Live Examples,
  • Double-click the LiveExamplesCS or LiveExamplesVB file located in C:\Program Files\Telerik\RadControlsQ1 2007\NET2,
  • or drag the LiveExamplesCS or LiveExamplesVB file located in C:\Program Files\Telerik\RadControlsQ1 2007\NET2 to start the examples in your browser.

Install without Internet Information Services (VS 2005 only)

To install Telerik RadControls on your machine from the EXE file, follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadControls for ASP.NET.
  4. Go to the Download tab to download the Automatic installation (EXE) file.
  5. Once the download completes, run the RadControls EXE file and follow the instructions.

    The wizard will install the Telerik RadControls for ASP.NET component in the following folder unless you specify otherwise:
    C:\Program Files\Telerik\.

When Internet information Services is not running, the product installation will NOT create virtual directories for the QSF, nor will it create any shortcuts for launching the QSF on localhost. To launch the Quick-Start framework, open and Run (Ctrl+F5) its VisualStudio Web Site using the provided shortcut in the Start Menu:
Start Menu -> Programs -> Telerik -> RadControlsQ1 2007 for ASP.NET-> ASP.NET 2.X -> Open Sample Web Site in Visual Studio
VisualStudio 2005 will start the QSF locally using the integrated ASP.NET Development Server.

The Telerik RadControls for ASP.NET package adds the products automatically to the VS.NET 2005 toolbox. To learn how to add them manually, see Adding Telerik RadMenu to the Visual Studio 2005 Toolbox.

See Also

Files and folders needed by Telerik RadControls for ASP.NET
Trial License Limitations

© 2002-2008 Telerik. All Rights Reserved.


Installing Telerik RadMenu from EXE file

Telerik RadMenu v4.4 Send comments on this topic.
Installing Telerik RadMenu from EXE file
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Installing Telerik RadMenu from EXE file

Glossary Item Box

The EXE files are intended for easy and automatic installation of a product. The EXE installs the control on your computer to a folder named Telerik in your Program Files, automatically creating the necessary virtual folders and projects. Additionally, it installs the help file(s) in the VS.NET IDE and in your local copy of MSDN, if you have such installed.

The EXE files are best for first-time Telerik users and ASP.NET novices.

The latest package available for download already has all updates/HOTFIXES applied. There is no need to update it further.
The EXE installation will not overwrite previous Telerik RadMenu installations, unless it is of the same version.

Install with Internet Information Services (IIS) Running

To install Telerik RadMenu on your machine from the EXE file follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadMenu.
  4. Go to the Download tab and download the Automatic installation (EXE) file.
  5. Once the download completes, run the RadMenu_4_4.exe and follow the instructions.

The wizard will create a virtual folder "Telerik RadMenu4.4NET2" (accessible at http://localhost/Telerik/telerikradmenu4.4_NET2).

To view live examples of the Telerik RadMenu functionality, you can launch the Quick Start Framework in either of the following ways:

  • Open Start Menu -> Programs -> Telerik -> Telerik RadMenu v4.4 -> ASP.NET 2.X -> Telerik RadMenu v4.4 C#/VB Live Examples,
  • Double-click the LiveExamplesCS or LiveExamplesVB file located in C:\Program Files\Telerik\Telerik RadMenu v4.4\NET2,
  • or drag the LiveExamplesCS or LiveExamplesVB file located in C:\Program Files\Telerik\Telerik RadMenu v4.4\NET2 to start the examples in your browser.

Install without Internet Information Services (VS 2005 only)

To install Telerik RadMenu on your machine from the EXE file follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Locate Telerik RadMenu, and click on it.
  4. Go to the Download tab to download the Automatic installation (EXE) file.
  5. Once the download completes, run the RadMenu_4_4.exe and follow the instructions.

When Internet information Services is not running, the product installation will NOT create virtual directories for the QSF, nor will it create any shortcuts for launching the QSF on localhost. To launch the Quick-Start framework, open and Run (Ctrl+F5) its VisualStudio Web Site using the provided shortcut in the Start Menu:
Start Menu -> Telerik -> Telerik RadMenu v4.4 -> ASP.NET 2.X -> Open Sample Web Site in Visual Studio
VisualStudio 2005 will start the QSF locally using the integrated ASP.NET Development Server.

Telerik RadMenu will be added automatically to VS.NET 2005's toolbox. Review the following instructions to add it manually: Adding Telerik RadMenu to the Visual Studio 2005 Toolbox

The wizard will install the Telerik RadMenu component in the following folder unless you specify otherwise:
\Program Files\Telerik\Telerik RadMenu4.4\NET2.

The installation folder contains the following subfolders and files:

  • "bin" - contains the .dll files

  • "Common" - contains JavaScripts and css files

  • "RadControls" - contains the clients-side JavaScript and resource files
    You will need to copy this folder in your web application only if you intend to use skins different from the default or if you plan to modify the JavaScript files.

  • "menu" - contains the running examples from the Quick-Start framework

  • LiveExamplesCS - a browser link to run the C# version of the examples locally
  • LiveExamplesVB - a browser link to run the VB.NET version of the examples locally

The information below is generic for all Telerik controls. The particular details vary for individual control installations.

The installation folders of some Telerik controls may also contain the following subfolders:

  • "DeploymentActions" - contains the files required for proper deployment of the control
  • "Help" - contains all the files required for generating Help2
  • "Img" - contains system images
  • "InstalledRelated" - contains the files required for proper installation of the control

See Also

Adding Telerik RadMenu to an ASP.NET WebForm
Add/Remove Telerik RadMenu to the Global Assembly Cache
Trial License Limitations

© 2002-2008 Telerik. All Rights Reserved.


Installing the Telerik RadControls for ASP.NET suite from ZIP file

Telerik RadMenu v4.4 Send comments on this topic.
Installing the Telerik RadControls for ASP.NET suite from ZIP file
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Installing the Telerik RadControls for ASP.NET suite from ZIP file

Glossary Item Box

Show All Show All
Hide All Hide All

The ZIP is used to install Telerik RadControls for ASP.NET manually for upgrading or updating purposes. The folder structure is different from the EXE installation. You need to be familiar with with ASP.NET, IIS, setting permissions and creating virtual folders. Commonly, the ZIP is installed directly in inetpub/wwwroot.

Install without IIS Running (VS 2005 only)

To install the Telerik RadControls for ASP.NET suite on your machine from the ZIP file, follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadControls for ASP.NET.
  4. Go to the Download tab to download the Manual installation (ZIP) file. Hide What does the ZIP contain?
    The ZIP file contains the following folders:
    • DeploymentActions folder - contains the files required for the automatic deployment of Telerik RadControls for ASP.NET - this folder is not needed when installing the control from the ZIP
    • Help folder - contains all files and folders required for generating Help1
    • HelpNET20 folder - contains all files and folders required for generating Help2
    • NET1 folder - contains the needed files and folders for deploying Telerik RadControls for ASP.NET under ASP.NET1.x
    • NET2 folder - contains the needed files and folders for deploying Telerik RadControls for ASP.NET under ASP.NET2.x
    • other files and folders.
  5. The latest package available for download has all latest updates/HOTFIXES applied. There is no need to update it further.
  6. Once the download completes, create a Telerik_RadControls folder in your IIS's inetpub/wwwroot folder.
  7. From the downloaded file, extract the files from the NET2 folder into inetpub/wwwroot/Telerik_RadControls folder. After the process ends, the inetpub/wwwroot/Telerik_RadControls folder should contain the following files and folders:
    • app_themes folder - contains the themes and skins used by Telerik's navigational controls
    • bin folder - contains the controls' .dll file(s)
    • Common folder - contains JavaScripts, css files and/or ascx files
    • Img folder - contains system images
    • RadControls folder - contains the clients-side JavaScript and resource files, needed by Telerik's controls. You will need to copy this folder in your web application only if you intend to use skins different from the Default or if you plan to modify the JavaScript files.
      Exceptions: Because of the specific control features, you will always need to copy RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell, Telerik RadUpload and Telerik RadWindow products.
    • folders, named after Telerik's controls (i.e. Calendar, Chart, Combobox, etc.) - these contain the running examples for each control from the Quick-Start framework
    • other project files and folders.
  8. Create a .NET2 virtual directory for the folder where you extracted the files. Hide How?

    This is accomplished through the Internet Information Services console on your machine:
    Start -> Settings -> Control Panel -> Administrative Tools -> Internet Information Services:
    1. Right-click the folder you have created (Telerik_RadControls).
    2. Select Properties.
    3. Click the Create button. The application name will become Telerik_RadControls.
    4. Click Apply.
    5. Click the ASP.NET tab.
    6. From the drop-down list, select your ASP.NET 2.0 version:

      ASP.NET tab under .NET2.0
    7. Click OK.
  9. Give full permissions to the ASPNET user (if you are using IIS5) or to the Network Service account (under IIS6, Windows Server 2003) on the folder where the files were extracted. See Setting ASNET (Network Service) Permissions for more information.

To run the examples paste the following link in your browser: http://localhost/Telerik_RadControls/

To register the MS Help 2 files to VisualStudio and MSDN, please review the following link:
http://www.telerik.com/Default.aspx?PageId=2657

To add any control to the VS.NET toolbox, review Adding Telerik RadMenu to the Visual Studio 2005 Toolbox
To use any Telerik ASP.NET control in your project, review Adding Telerik RadMenu to an ASP.NET WebForm

DO NOT include/add the examples in your VS.NET project as this will break the Telerik control(s).

See Also

Files and folders needed by Telerik RadControls for ASP.NET
Trial License Limitations
Register MS Help 2 files

© 2002-2008 Telerik. All Rights Reserved.


Installing Telerik RadMenu from ZIP file

Telerik RadMenu v4.4 Send comments on this topic.
Installing Telerik RadMenu from ZIP file
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Installing Telerik RadMenu from ZIP file

Glossary Item Box

Show All Show All
Hide All Hide All

The ZIP is used to install Telerik RadMenu manually for upgrading or updating purposes. The folder structure is different from the EXE installation. You need to be familiar with with ASP.NET, IIS, setting permissions and creating virtual folders. Commonly, the ZIP is installed directly in inetpub/wwwroot.

Install Telerik RadMenu with IIS running

To install Telerik RadMenu on your machine from the ZIP file, follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadMenu.
  4. Go to the Download tab to download the Manual installation (ZIP) file. Show What does the ZIP contain?
    The ZIP file contains the following folders:
    • DeploymentActions folder - contains the files required for the automatic deployment of Telerik RadMenu - this folder is not needed when installing the control from the ZIP
    • Help folder - contains all files and folders required for generating Help2
    • NET1 folder - contains the needed files and folders for deploying Telerik RadMenu under ASP.NET1.x
    • NET2 folder - contains the needed files and folders for deploying Telerik RadMenu under ASP.NET2.x
    The latest package available for download already has all updates/HOTFIXES applied. There is no need to update it further.
  5. Once the download completes, create a RadMenu folder in your IIS's inetpub/wwwroot folder.
  6. From the downloaded file, extract all files from the NET2 folder into inetpub/wwwroot/RadMenu folder. After the process ends, the inetpub/wwwroot/RadMenu/ folder should contain the following files and folders:
    • App_Themes folder - contains some .NET2.0 themes provided by Telerik
    • bin folder - contains the .dll file(s)
    • Common folder - contains JavaScripts, css files and/or ascx files
    • Img folder - contains system images
    • RadControls folder - contains the clients-side JavaScript and resource files. You will need to copy this folder in your web application only if you intend to use skins different from the default or if you plan to modify the JavaScript files.
      Exceptions: Because of the specific control features, you will always need to copy RadControls for RadChart, RadEditor, RadSpell, RadUpload and RadWindow products.
    • menu folder - contains the running examples from the Quick-Start framework
    • other project files.
  7. Create a .NET2 virtual directory for the folder where you unzipped the files. Show How?
    This is accomplished through the Internet Information Services console on your machine:
    Start -> Settings -> Control Panel -> Administrative Tools -> Internet Information Services:
    1. Right-click the folder you have created (RadMenu).
    2. Select Properties.
    3. Click the Create button. The application name will become RadMenu.
    4. Click Apply.
    5. Click the ASP.NET tab.
    6. From the drop-down list, select your ASP.NET 2.0 version:

      ASP.NET tab under .NET2.0
    7. Click OK.
  8. Give full permissions to the ASPNET user (if you are using IIS5) or to the Network Service account (under IIS6, Windows Server 2003) on the folder where the files were unzipped. See Setting ASNET (Network Service) Permissions for more information.

To run the examples, paste the following link in your browser: http://localhost/RadMenu

Install Telerik RadMenu without or with IIS stopped (VS 2005 Only)

To install Telerik RadMenu on your machine from the ZIP file, follow the instructions below:

  1. Log in your Client.NET account.
  2. Go to My licenses and click My Purchases (or My Free Trials if you are a trial user).
  3. Click Telerik RadMenu.
  4. Go to the Download tab to download the Manual installation (ZIP) file. Show What does the ZIP contain?
    The ZIP file contains the following folders:
    • DeploymentActions folder - contains the files required for the automatic deployment of Telerik RadMenu - this folder is not needed when installing the control from the ZIP
    • Help folder - contains all files and folders required for generating Help2
    • NET1 folder - contains the needed files and folders for deploying Telerik RadMenu under ASP.NET1.x
    • NET2 folder - contains the needed files and folders for deploying Telerik RadMenu under ASP.NET2.x
    The latest package available for download already has all updates/HOTFIXES applied. There is no need to update it further.
  5. From the downloaded file, extract all files from the NET2 folder into folder at a convenient location on your disk. After the process ends, the folder should contain the following files and folders:
    • App_Themes folder - contains some .NET2.0 themes provided by Telerik
    • bin folder - contains the .dll file(s)
    • Common folder - contains JavaScripts, css files and/or ascx files
    • Img folder - contains system images
    • RadControls folder - contains the clients-side JavaScript and resource files. You will need to copy this folder in your web application only if you intend to use skins different from the default or if you plan to modify the JavaScript files.
    • menu folder - contains the running examples from the Quick-Start framework
    • other project files.
  6. Open and Run (Ctrl+F5) Quick-Start Framework VisualStudio Web Site using the provided solution file ControlsExamples.sln in the NET2 folder. VisualStudio 2005 will start the QSF locally using the integrated ASP.NET Development Server.

To register the MS Help 2 files to VisualStudio and MSDN, please review the following link:
http://www.telerik.com/Default.aspx?PageId=2657

To add Telerik RadMenu to the VS.NET toolbox, review Adding Telerik RadMenu to the Visual Studio 2005 Toolbox.

To use the Telerik RadMenu in your project, please review Adding Telerik RadMenu to an ASP.NET WebForm.

DO NOT include/add the examples in your VS.NET project as this will break the Telerik control(s).

See Also

Adding Telerik RadMenu to an ASP.NET WebForm
Add/Remove Telerik RadMenu to the Global Assembly Cache
Trial License Limitations
Register MS Help 2 files

© 2002-2008 Telerik. All Rights Reserved.


Using the 'DLL and Scripts only' file (HOTFIX)

Telerik RadMenu v4.4 Send comments on this topic.
Using the 'DLL and Scripts only' file (HOTFIX)
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Using the 'DLL and Scripts only' file (HOTFIX)

Glossary Item Box

Show All Show All
Hide All Hide All

The "DLL and Scripts only" file (a.k.a. HOTFIX file) is a bare-bones upgrade option for our controls - they contain only those files that you need to replace in your project to upgrade to the new version of a Telerik control. If you are already using a Telerik product, there is no need to download the complete suite - download the "DLL and scripts only" version and follow the instructions below for applying the hotfix. The "DLL and Scripts only" file contains the following folders and files:

  • bin folder - contains the DLL file(s)
  • RadControls folder - contains the clients-side JavaScript and resource files for Telerik RadMenu
If you are installing a Telerik product for the first time, we recommend that you download the complete package (EXE or ZIP file).

To update Telerik RadMenu to a new version

  1. Log in your Client.NET account.
  2. Go to "My licenses" and click on "My Purchases" (or "My Free Trials" if you are a trial user).
  3. Locate the control that you need to install, i.e. Telerik RadMenu, and click on it.
  4. Click on the "Download" tab and download the "DLL and Scripts only" file. If you have purchased the control, you need to download the file which has the Dev abbreviation in it.
  5. Once the download completes, unzip the files at a convenient location.
  6. If the upgrade is major (i.e. from v3.x to v4.x), check the Changes and Backward Compatibility section in this manual for further instructions.
  7. Back up your application.
  8. Close Visual Studio or any ither IDE which may lock the old assembly.
  9. From the newly downloaded and unzipped files, copy the new DLL (located in the bin folder) to your web-application's bin folder. Replace the old dll.
  10. [Optional. Follow this step only if you intend to use skins different from the default or if you plan to modify the JavaScript files
    Exceptions: Because of the specific control features, you will always need to copy RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products. ]
    Copy the new RadControls folder to the root of your web-application. Replace all files and folders when asked. If you moved the RadControls folder through the RadControlsDir property to another location (different from the root), then locate the old folder and paste the new RadControls folder over it. Replace all files and folders when asked.
  11. If you are using VS.NET, update the control's reference in your project to point to the new DLL.
  12. Recompile your project.
  13. If you have added the control in GAC, remove it by running a gacUtil to remove the old copy and then add the new one. More information on the topic can be located here: Add/Remove Telerik RadMenu to the Global Assembly Cache
  14. Run the project.
  15. If you still get the older version of Telerik RadMenu Hide click here

    • Sometimes the .NET Framework wrongly caches the Telerik RadMenu's DLL and therefore the update may seem to have failed. Try the following to ensure that this is not the case:

      1. Terminate the aspnet_wp.exe process (from the Windows Task Manager)
      2. Open a Windows Explorer and navigate to C:\Windows(WINNT)\Microsoft.NET\Framework\v[YOUR_VERSION]\Temporary ASP.NET Files
      3. Delete all folders with names, corresponding to your Telerik projects, i.e. RadMenu, etc.
    • Delete your Visual Studio web project cache(s) - it should be located in C:\Documents and Settings\[YOUR USER]\VSWebCache.
    • Delete your browser cache: Tools -> Internet Options -> Delete Files....
  16. If you get a copyright message Show click here

    The copyright message appears only when using the trial version of Telerik RadMenu (the Developer versions of Telerik's controls do not throw copyright messages).

    If you have purchased the control, then you have downloaded the wrong "DLL and Scripts only" file. Make sure you you download the proper, Developer "DLL and Scripts only" file. You will recognize it by the Dev abbreviation in the file name.

See Also

Adding Telerik RadMenu to an ASP.NET WebForm
Add/Remove Telerik RadMenu to the Global Assembly Cache
Trial License Limitations

© 2002-2008 Telerik. All Rights Reserved.


Setting ASPNET (Network Service) Permissions

Telerik RadMenu v4.4 Send comments on this topic.
Setting ASPNET (Network Service) Permissions
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Setting ASPNET (Network Service) Permissions

Glossary Item Box

In most applications, users typically access Web applications anonymously — that is, they do not initially provide authentication credentials. In that case, the Web application has to assume (impersonate) some identity that it can use to request resources.
By default, when ASP.NET allows anonymous access, the application runs in the context of a special local (not domain) account. The user context depends on the operating system. In Windows 2000 and Windows XP, applications run under the account called ASPNET. In Windows Server 2003, the user context is called NETWORK SERVICE. These user accounts are created during the .NET Framework installation process with a unique, strong password, and are granted only limited permissions. The ASPNET or NETWORK SERVICE user can access only specific folders that are required to run a Web application, such as the \bin directory in which a Web application stores compiled files.

Full information on the topic can be found in MSDN: Security Considerations for ASP.NET Web Applications

Instructions on how to give process permissions on a folder - FAT32 file system

No need to give any permissions on the folder.

Instructions on how to give process permissions on a folder - NTFS file system

Internet Information Services v5.x - name of account: ASPNET user

  1. Right-click on the RadMenu (or Telerik_RadControls) folder and select Properties.
  2. Click on the Security tab. If you do not see the security tab, click Show here

    The Security tab is not visible because you have Simple File Sharing enabled. You will need to disable it before you continue. To do so:
    1. Open a Windows Explorer.
    2. On the Tools menu, click Folder Options, and then click the View tab.
    3. In the Advanced Settings section, clear the Use simple file sharing (Recommended) check box (at the bottom of the list).
    4. Click OK.
    5. Right-click on the folder you need to add ASPNET permissions to and select Properties. Click on the Security tab.

  3. Click on Add (to add a new user).

  4. Click on Locations to select your local machine. Your screen should look similar to the following:

    Setting ASPNET permissions

  5. Select your local machine and click OK.

  6. Type ASPNET in the textbox and click on Check Names. ASPNET should underline (if it doesn't then you don't have Microsoft's .NET framework installed).

    ASPNET user

  7. Click OK.

  8. Select the LOCAL MACHINE NAME/ASPNET user you just created (it should be named ASP.NET Machine Account (NAME/ASPNET)) and check the Full Control box to give it full permissions.

  9. Click APPLY.

  10. Click Advanced and make sure that the "Inherit from parent ..." check box is checked.

  11. Click OK to close the Advanced properties.

  12. Click OK to close the folder properties.

Internet Information Services v6.x - name of account: Network Service user

Same as above but replace ASPNET with Network Service.

© 2002-2008 Telerik. All Rights Reserved.


Trial License Limitations

Telerik RadMenu v4.4 Send comments on this topic.
Trial License Limitations
See Also
Installation and deployment > Installation > Installing Telerik RadMenu on your computer > Trial License Limitations

Glossary Item Box

Developer Licenses

Developer licenses come with modified DLLs, which work without license keys. If you have a Developer license for one or more of the Telerik components, you only need to ensure that you are using the developer build when downloading the control(s). These builds have the Dev abbreviation in their file names.

If your application is displaying a license key error, this means that you are using a trial version of the product. Log in to your Client.net account and download the developer build. To update your project, please take a look at the Upgrading the Trial License to a Production License section for step-by-step instructions.

Trial Licenses

The free trial licenses of all Telerik products are fully functional and will work for an unlimited time but with trial error messages (see below) displayed randomly on the page.

Trial error messages

The trial licenses will occasionally display the following message on your webform:

Telerik RadMenu 4.4 trial version. Copyright Telerik © 2002-2008. To remove this message, please, purchase a developer version .

See Also

License Agreement

© 2002-2008 Telerik. All Rights Reserved.


Files and folders needed by Telerik RadControls for ASP.NET

Telerik RadMenu v4.4 Send comments on this topic.
Files and folders needed by Telerik RadControls for ASP.NET
See Also
Installation and deployment > Installation > Files and Folders needed by Telerik RadControls > Files and folders needed by Telerik RadControls for ASP.NET

Glossary Item Box

Please, review the following KB article on the topic:

Which files and folders are mandatory to be on the server for Telerik RadControls for ASP.NET to function

See Also

The 'RadControls' Folder

© 2002-2008 Telerik. All Rights Reserved.


The 'RadControls' Folder

Telerik RadMenu v4.4 Send comments on this topic.
The 'RadControls' Folder
See Also
Installation and deployment > Installation > Files and Folders needed by Telerik RadControls > The 'RadControls' Folder

Glossary Item Box

The RadControls folder is an essential part of Telerik RadControls for ASP.NET - it contains all resources needed for the components to function properly (i.e. images, client-side scripts, configuration files, skins, etc.).

You will need to copy this folder in your web application only if you intend to use skins different from the default or if you plan to modify the JavaScript files. However because of the specific control features, you will always need to copy /RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products.

Each Telerik component seeks its resources in the respective subfolder of RadControls: for example, /RadControls/Menu is the folder where the resources for Telerik RadMenu reside.

Copying the RadControls folder to your web application

To work with Telerik RadControls for ASP.NET, you need to copy the RadControls folder to your web application. The folder must contain all the subfolders of the controls you are going to use. Do not copy the subfolders of controls you are not planning to use as this may cause a number of compilation errors: Visual Studio 2005 compiles all files in the web project; errors occur when missing assemblies are not found.

Do not include the RadControls folder in your VS.NET solution! Hide Why?

When the RadControls folder is included in a VB.NET project, VS.NET tends to change some files within the RadControls folder automatically. The extent of these changes depends on the IDE settings; notably, the following controls are affected:
  • Telerik RadEditor
  • Telerik RadSpell
  • Telerik RadChart
Telerik controls are written in C# - hence the several *.CS codebehind files within the RadControls/[control] folder. When such .ASCX/ASPX files are included in the project, VS.NET automatically changes the Language attribute of their Page/Control directive from cs to vb and breaks the control.

To avoid the problem:
  1. In Windows Explorer, do a filtered search to locate all ASPX and ASCX files within the RadControls folder.
  2. Once the search is over, select all files and right-click to get their properties.
  3. Select the Hidden check box and click OK.
Now Visual Studio will not see the files, so errors will not be thrown. At the same time IIS will see the files and will display them fine.

If you have already included the RadControls folder in your VS2005 project:
  1. Open your Visual Studio 2005 project.
  2. In the Solution Explorer locate the RadControls folder and expand it.
  3. Locate the problematic ascx files, right-click them and select "Exclude from project". Unfortunately, this can be done for files only (unlike VS2003), so the process should be repeated for all ascx files.
  4. Open Windows Explorer, navigate to your project's folder.
  5. Back up the RadControls folder from your project, especially any customized files you may have (ConfigFile.xml, ToolsFile.xml, any css files, images. etc).
  6. Delete the damaged RadControls folder.
  7. Navigate to the installation folder of Telerik RadMenu (for example).
  8. Copy the RadControls folder from the installation folder to the root of your web application.
  9. Rebuild and run your project.

Moving the RadControls folder within your web-application

  1. Manually copy the RadControls folder to the new location within your web application (for example, ~/Resources/).
    Do not use the VS.NET IDE to copy/move the RadControls folder to another location as it changes the namespaces of the files and changes the project language from C# to VB which in turn breaks the application! Use Windows Explorer instead.
  2. Either:
    • Specify its position in the RadControlsDir property in the control's declaration in your ASCX/ASPX file, e.g.
      Copy Code
      <radM:RadMenu
      RadControlsDir="~/Resources/RadControls/" ...>
      </      radM:RadMenu>
    • Or set the property globally from the Web.config file of the application:
      Copy Code
      <configuration>
      <appSettings>
      <add key="Telerik.WebControls.RadControlsDir" value="~/Resources/RadControls/"/>
      </appSettings>
      </      configuration>
      Notes.
      • In the above examples, the tilde "~" represents the root of your web application.
      • If the RadControlsDir property has been set in more than one way, the value set from Web.config is overridden.

Moving the RadControls folder outside your web-application

This is the best scenario if you want to have a single RadControls folder for several applications. This mechanism also enables different versions of Telerik products to reside in different web applications:

  1. Manually copy the RadControls to the new location.
    Do not use the VS.NET IDE to copy/move the RadControls folder to another location as it changes the namespaces of the files and changes the project language from C# to VB, which in turn breaks the application! Use Windows Explorer instead.
  2. Create a virtual directory with name RadControls under each application's root which points physically to the same physical RadControls folder. That physical folder should include all the scripts and other required settings of the controls.
    The respective RadControls virtual directory should NOT be a web application but virtual directory only! You can find more information on the topic in the following KB article: (ID#728) Error Message: Could not load type 'Telerik.WebControls.Dialogs.Dialog'.
  3. Either:
    • Specify its position in the RadControlsDir property in the control's declaration in your ASCX/ASPX file, e.g.

    • Or set the property globally from the Web.config file of the application:
      Copy Code
      <configuration>
      <appSettings>
      <add key="Telerik.WebControls.RadControlsDir" value="~/RadControls/"/>
      </appSettings>
      </      configuration>
      Notes.
      • In the above examples, the tilde "~" represents the root of your web application.
      • If the RadControlsDir property has been set in more than one way, the value set from Web.config is overridden.
      • Make sure you set the RadControlsDir property to "~/RadControls/" (with a slash following the folder name).

"You have not copied the RadControls folder to the root folder of your web-application" error message

When opening a page which contains Telerik RadMenu, the following error message appears:
“Telerik RadMenu v4.4: You have not copied the RadControls folder to the root folder of your web-application or you have applied an update incorrectly."

This message shows that the control is not able to locate its RadControls/menu folder. It usually appears after updating the control to a newer version. The causes for the message to appear are:

  • The assembly version and the RadControls/menu folder version are from different installation downloads, i.e. from different Telerik RadMenu versions.
    Example: RadMenu.NET2.DLL is version 4.4.2, whereas the Telerik RadMenu's RadControls/Menu folder is from version 4.4.1 or other.
  • The proper assembly is in the bin folder of the application, but the RadControls/menu folder is missing or misplaced.

To solve the problem:

  1. Check whether the RadControls folder is placed in the root of your web application and that you have NOT set the RadControlsDir property to point to another location.
  2. Check whether the RadControls/menu folder contains a subfolder, named Scripts, and a subfolder which carries the version of the control as its name.
    For example, if you use Telerik RadMenu v4.4.2 - the folder should be \RadControls\Menu\Scripts\4_4_2 and this version number should match the RadMenu.NET2.dll version placed in the /bin folder.
    If such discrepancy exists between the control's assembly and the RadControls folder, use a DLL and RadControls folder from a working application or download the ZIP file from your Client.net account and use the files from there.
  3. Another reason could be that some files from the RadControls/menu folder are missing or damaged. Please delete the current RadControls folder and paste the original one from the same download that you have the assembly from.
  4. For some reason your project may still reference the previous version of control's DLL, and not the latest. In this case we suggest removing the old assembly reference from your VS.NET project and adding a new reference to to the new assembly.
  5. If you have added the control in the GAC (Global assembly cache), remove it by running gacUtil and then add the new version.
  6. If you are trying to move the RadControls folder through the RadControlsDir property, please review the following section for resolution:

  7. [not related to Telerik controls] Delete .NET, VS and browser caches because they can cause a problem too:

    1. Terminate the aspnet_wp.exe process (from the Windows Task Manager)
    2. Open a Windows Explorer and navigate to
      C:\Windows(WINNT)\Microsoft.NET\Framework\vYOUR_VERSION\Temporary ASP.NET Files
    3. Delete all the folders with names, corresponding to your Telerik projects.
    4. Delete your Visual Studio web project caches as well - they should be located at C:\Documents and Settings\VSWebCache.
    5. Delete your browser cache: Tools -> Internet Options -> Delete Files....

See Also

Setting the RadControlsDir property

© 2002-2008 Telerik. All Rights Reserved.


Setting the RadControlsDir property

Telerik RadMenu v4.4 Send comments on this topic.
Setting the RadControlsDir property
See Also
Installation and deployment > Installation > Files and Folders needed by Telerik RadControls > Setting the RadControlsDir property

Glossary Item Box

The RadControlsDir property can be set:

  • either from the ASPX/ASCX page where Telerik RadMenu resides (or programmatically, from the code behind),
  • or globally, for all controls in the web application, from the Web.config file.

To set RadControlsDir from the Web.config, add the following line inside the appSettings tag:

Notes.
  • In the above example, the tilde "~" represents the root of your web application.
  • You can change the location of the RadControls folder. The path given here is to serve only as an illustration.
  • If the RadControlsDir property has been set in more than one way, the value set from Web.config is overridden.
  • When you set the RadControlsDir property, its value does not automatically update other properties that contain URL strings. You need to update these properties manually.

See Also

The 'RadControls' Folder

© 2002-2008 Telerik. All Rights Reserved.


Adding Telerik RadMenu to the Visual Studio 2005 Toolbox

Telerik RadMenu v4.4 Send comments on this topic.
Adding Telerik RadMenu to the Visual Studio 2005 Toolbox
See Also
Installation and deployment > Installation > Adding Telerik RadMenu to the Visual Studio 2005 Toolbox

Glossary Item Box

Telerik RadControls for ASP.NET are added automatically to the Visual Studio .NET 2005 Toolbox during installation. However if you are using the ZIP distribution, you can do this manually as described below.

To add Telerik RadMenu to the Toolbox manually and to be able to easily deploy the component in your WebForms in Design mode, follow the steps below:

  1. Open your application in Visual Studio 2005.
  2. Expand the Toolbox.

  3. Expand the General Section.

  4. Right-click in the General section and open Choose Items.

  5. On the .NET Framework Components tab, click Browse.

  6. Browse to the Telerik RadMenu installation folder, open the NET2 folder and from the bin subfolder, select the RadMenu.Net2.dll.

    • If the EXE was used to install Telerik RadControls for ASP.NET, the bin folder is located in
      C:\Program Files\Telerik\Telerik RadControls for ASP.NETQ1 2007\NET2\bin

    • If the ZIP was used to install Telerik RadMenu, the bin folder is located in the folder where the installation files have been unzipped (usually "\Inetpub\wwwroot\RadMenu_4_4\NET2"

  7. Click Open to confirm. The Telerik RadMenu icon should appear in the Toolbox.

  8. If you intend to use skins different from the default or if you plan to modify the JavaScript files, do not forget to copy the respective RadControls folder to the root of your application. For more information, see The 'RadControls' Folder.

See Also

Adding Telerik RadMenu to an ASP.NET WebForm

© 2002-2008 Telerik. All Rights Reserved.


Adding RadControls to the Visual Studio 2008 Toolbox

Telerik RadMenu v4.4 Send comments on this topic.
Adding RadControls to the Visual Studio 2008 Toolbox
Installation and deployment > Installation > Adding RadControls to the Visual Studio 2008 Toolbox

Glossary Item Box

Telerik RadControls for ASP.NET are added automatically to the Visual Studio .NET 2008 Toolbox during installation. However if you are using the ZIP distribution, you can do this manually as described below.

To add Telerik RadControls "Prometheus" for ASP.NET to the Toolbox manually and to be able to easily deploy the component in your WebForms in Design mode, follow the steps below:

  1. Open your application in Visual Studio 2008.
  2. Expand the Toolbox.

  3. Expand the General Section.

  4. Right-click in the General section and open Choose Items.

  5. On the .NET Framework Components tab, click Browse.

  6. Browse to the Telerik RadControls for ASP.NET installation folder, open the bin35 folder and select the Telerik.Web.UI.dll.

    • If the EXE was used to install Telerik RadControls for ASP.NET, the bin35 folder is located in
      C:\Program Files\Telerik\RadControls for ASPNET\bin35

    • If the ZIP was used to install Telerik RadControls, the bin35 folder is located in the folder where the installation files have been unzipped

  7. Click Open to confirm. The icons for all controls in the suite will appear in the Toolbox. Visual Studio 2008 toolbox

© 2002-2008 Telerik. All Rights Reserved.


Adding Telerik RadMenu to an ASP.NET WebForm

Telerik RadMenu v4.4 Send comments on this topic.
Adding Telerik RadMenu to an ASP.NET WebForm
Installation and deployment > Installation > Adding Telerik RadMenu to an ASP.NET WebForm

Glossary Item Box

To add Telerik RadMenu to an ASP.NET WebForm you can use either of the following approaches:

  • Drag the Telerik RadMenu icon from the Visual Studio Toolbox;

  • Write the Telerik RadMenu tag manually.

If you intend to use skins different from the default or if you plan to modify the JavaScript files, you also need to manually copy the Menu subfolder under the RadControls folder from the Telerik RadMenu installation folder to the root folder of your web application.

Because of the specific control features, you will always need to copy RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products.
If your RadControls folder contains multiple subfolders for Telerik controls - for example, if you are using a Telerik RadControls for ASP.NET installation as opposed to a Telerik RadMenu installation - make sure you copy only the subfolders of the controls you are going to use (Menu and any other controls you need). Do not copy the subfolders of controls you are not planning to use as this may cause a number of compilation errors: Visual Studio 2005 compiles all files in the web project; errors occur when missing assemblies are not found.

Adding Telerik RadMenu to a WebForm using Visual Studio .Net

The easiest way to deploy Telerik RadMenu is by dragging its icon from the Visual Studio .NET Toolbox in Design mode. Visual Studio will automatically copy the RadMenu.NET2.dll to the bin folder of your web-application and will create the respective references. You only have to copy the RadControls folder to the root folder of your web application as explained above.

Adding Telerik RadMenu to a WebForm manually

If you are not using Visual Studio .NET, you can deploy Telerik RadMenu manually. Follow the instructions below:

  1. Copy the RadControls folder from the Telerik RadMenu installation folder to the folder of your web application.

  2. Copy the RadMenu.NET2.dll from the bin folder of the Telerik RadMenu installation to the bin folder of your web application.

  3. Open your aspx/ascx file and add the Telerik RadMenu Register directive at the top:
    <%@ Register TagPrefix="radM" Namespace="Telerik.WebControls" Assembly="RadMenu.Net2" %>

    If you plan all pages in your application to use Telerik RadMenu you can add the following lines in your web.config file. In this case you don't need to add this directive in your pages.

    Copy Code
    <pages>
    <controls>
    <add tagPrefix="radM" namespace="Telerik.WebControls" assembly="RadMenu.Net2" />
    </controls>
    </    pages>

  4. Write the Telerik RadMenu tags in the body of the WebForm:

    Copy Code
    <radM:RadMenu ID="menu1" Runat="server">
    </    radM:RadMenu>
  5. Add any additional properties you need between the Telerik RadMenu tags.

Troubleshooting: the css styles do not apply correctly

If you have a Telerik control in a user control with output caching turned on you should manually register all the required CSS files in the head tag of your page. Otherwise the control will not be displayed correctly. The easiest way to do this is through a LINK element:

<link href="~/RadControls/Menu/Skins/[SkinName]/styles.css"rel="stylesheet"runat="server">

© 2002-2008 Telerik. All Rights Reserved.


Using IntelliSense in Visual Studio 2005

Telerik RadMenu v4.4 Send comments on this topic.
Using IntelliSense in Visual Studio 2005
Installation and deployment > Installation > Using IntelliSense in Visual Studio 2005

Glossary Item Box

Visual Studio 2005 automatically enables IntelliSense - through reflection it detects all classes, properties and methods in the dll file(s).

For additional convenience each Telerik control is provided an XML file which contains the comments for its classes, properties and methods.

For example, when Telerik RadMenu is dragged to the webform the RadMenu.Net2.xml file is automatically added in the bin directory of the project.

In ASPX, when you start typing or when you insert a space, VisualStudio will show a dropdown with suggestions for autocomplete.

In code-behind, each time a particular class/property/method is being selected from the dropdown of the autocomplete functionality, a tooltip with the comment for this class/property/method is displayed:

Intellisense in VS2005

© 2002-2008 Telerik. All Rights Reserved.


Using IntelliSense in Visual Studio 2008

Telerik RadMenu v4.4 Send comments on this topic.
Using IntelliSense in Visual Studio 2008
Installation and deployment > Installation > Using IntelliSense in Visual Studio 2008

Glossary Item Box

Visual Studio 2008 automatically enables IntelliSense - it detects all classes, properties and methods in the DLL file and the JavaScript code.

For additional convenience each Telerik control comes with an XML file which contains the comments for its classes, properties and methods.
When the Telerik control is dragged to the webform the XML file is automatically added in the bin directory of the project.
In ASPX, when you start typing or when you insert a space, Visual Studio will show a dropdown with suggestions for autocomplete:

ASPX AutoComplete

Visual Studio 2008 provides full Javascript Intellisense completion in ASPX files, HTM files, as well as in external JS files. It provides rich support for the ASP.NET AJAX client JavaScript framework and JavaScript code built with it:

In code-behind, each time a particular class/property/method is being selected from the dropdown of the autocomplete functionality, a tooltip with the comment for this class/property/method is displayed.

© 2002-2008 Telerik. All Rights Reserved.


Upgrading Telerik RadMenu v4.x Trial to Telerik RadMenu v4.x Developer license

Telerik RadMenu v4.4 Send comments on this topic.
Upgrading Telerik RadMenu v4.x Trial to Telerik RadMenu v4.x Developer license
Installation and deployment > Installation > Upgrading Instructions > Upgrading Telerik RadMenu v4.x Trial to Telerik RadMenu v4.x Developer license

Glossary Item Box

Follow the steps below to upgrade your Telerik RadMenu v4.4 Trial license to a Developer (production) license.

THE PROCEDURE DESCRIBED IN THIS MANUAL IS IRREVERSIBLE AND YOU MAY LOSE YOUR DATA IF THE INSTALLATION IS NOT CARRIED OUT CORRECTLY!

1. Back up Your Old Files

We strongly suggest that you back-up your old Telerik RadMenu files and folders, especially if you would like to use your old settings.

2. Obtain the Necessary File

  1. Log in your Client.NET account.
  2. Go to "My licenses" and click on "My Purchases".
  3. Locate the control that you need to install, i.e. Telerik RadMenu, and click on it.
  4. Click on the "Download" tab and download the "DLL and Scripts only" file. Since you have purchased the control, make sure you are downloading the proper file - the Developer version has the Dev abbreviation in it.

3. Install and Copy the New Files

  1. Unzip the files at a convenient location.
  2. Check the Changes and Backward Compatibility section for introduced changes. If there are such, they should be applied a little later in the upgrade process.
  3. Back up your application if you haven't done so already.
  4. Close Visual Studio or any ither IDE which may lock the old assembly.
  5. From the newly downloaded and unzipped files, copy the new DLL (RadMenu.NET2.dll located in the bin folder) to your web-application's bin folder. Replace the old dll.
  6. Locate the old RadControls/Menu folder and delete it manually, i.e. using Windows Explorer. By default, the RadControls/Menu folder should be in the root of your application. If you moved the RadControls folder through the RadControlsDir property to another location (different from the root), then locate it and delete it using Windows Explorer.
    DO NOT use Visual Studio to move, copy or delete the RadControls folder as this will break the Telerik control(s).
  7. If you intend to use skins different from the default or if you plan to modify the JavaScript files, copy the new RadControls/Menu folder to the same location as above.
  8. If using VS.NET, update the control's reference in your project to point to the new DLL.
  9. Follow the steps in the Changes and Backward Compatibility section in case there are some changes between the versions.
  10. Recompile your project.
  11. If you have added the control in GAC, remove it by running a gacUtil to remove the old copy and then add the new one. More information on the topic can be located here: Add/Remove Telerik RadMenu to the Global Assembly Cache
  12. Run the project.
  13. If you still get the older version of Telerik RadMenu Hide click here

    • Sometimes the .NET Framework wrongly caches the Telerik RadMenu's DLL and therefore the update may seem to have failed. Try the following to ensure that this is not the case:

      1. Terminate the aspnet_wp.exe process (from the Windows Task Manager)
      2. Open a Windows Explorer and navigate to C:\Windows(WINNT)\Microsoft.NET\Framework\v[YOUR_VERSION]\Temporary ASP.NET Files
      3. Delete all folders with names, corresponding to your Telerik projects, i.e. RadMenu, etc.
    • Delete your Visual Studio web project cache(s) - it should be located in C:\Documents and Settings\[YOUR USER]\VSWebCache.
    • Delete your browser cache: Tools -> Internet Options -> Delete Files....

  14. If you get a copyright message Hide click here

    The copyright message appears only when using the trial version of Telerik RadMenu (the Developer versions of Telerik's controls do not throw copyright messages). Make sure you have downloaded the proper, Developer "DLL and Scripts only" file. You will recognize it by the Dev abbreviation in the file name.

5. Using the old ToolsFile.xml File and ConfigFile.xml file [valid for Telerik RadEditor and Telerik RadSpell only]

If you would like to use your old ToolsFile.xml and ConfigFile.xml files (which you backed up in #1 above), you can do so by copying them from the back-up to the RadControls\Editor folder (or RadControls\Spell respectively) of your web-application. When prompted to overwrite the other file, click "YES".

© 2002-2008 Telerik. All Rights Reserved.


Upgrading Telerik RadMenu v3.x Developer to Telerik RadMenu v4.x Developer license

Telerik RadMenu v4.4 Send comments on this topic.
Upgrading Telerik RadMenu v3.x Developer to Telerik RadMenu v4.x Developer license
Installation and deployment > Installation > Upgrading Instructions > Upgrading Telerik RadMenu v3.x Developer to Telerik RadMenu v4.x Developer license

Glossary Item Box

Follow the steps below to upgrade your Telerik RadMenu v3.x Developer license to Telerik RadMenu v4.4 Developer license.

These instructions are also valid for upgrading Telerik RadMenu v4.x Developer license to a newer Telerik RadMenu minor version.

THE PROCEDURE DESCRIBED IN THIS MANUAL IS IRREVERSIBLE AND YOU MAY LOSE YOUR DATA IF THE INSTALLATION IS NOT CARRIED OUT CORRECTLY!

1. Back up Your Old Files

We strongly suggest that you back-up your old Telerik RadMenu files and folders, especially if you would like to use your old settings.

2. Obtain the Necessary File

  1. Log in your Client.NET account.
  2. Go to "My licenses" and click on "My Purchases".
  3. Locate the control that you need to install, i.e. Telerik RadMenu, and click on it.
  4. Click on the "Download" tab and download the "DLL and Scripts only" file. Since you have purchased the control, make sure you are downloading the proper file - the Developer version has the Dev abbreviation in it.

3. Install and Copy the New Files

  1. Unzip the files at a convenient location.
  2. Check the Changes and Backward Compatibility section for introduced changes. If there are such, they should be applied a little later in the upgrade process.
  3. Backup your application if you haven't done so already.
  4. Close Visual Studio or any ither IDE which may lock the old assembly.
  5. From the newly downloaded and unzipped files, copy the new DLL (RadMenu.NET2.dll located in the bin folder) to your web-application's bin folder. Replace the old dll.
  6. Locate the old RadControls/Menu folder and delete it manually, i.e. using Windows Explorer. By default, the RadControls/Menu folder should be in the root of your application. If you moved the RadControls folder through the RadControlsDir property to another location (different from the root), then locate it and delete it using Windows Explorer.
    DO NOT use Visual Studio to move, copy or delete the RadControls folder as this will break the Telerik control(s).
  7. If you intend to use skins different from the default or if you plan to modify the JavaScript files, copy the new RadControls/Menu folder to the same location as above.
  8. If using VS.NET, update the control's reference in your project to point to the new DLL.
  9. Follow the steps in the Changes and Backward Compatibility section in case there are some changes between the versions.
  10. Recompile your project.
  11. If you have added the control in GAC, remove it by running a gacUtil to remove the old copy and then add the new one. More information on the topic can be located here: Add/Remove Telerik RadMenu to the Global Assembly Cache
  12. Run the project.
  13. If you still get the older version of Telerik RadMenu Show click here

    • Sometimes the .NET Framework wrongly caches the Telerik RadMenu's DLL and therefore the update may seem to have failed. Try the following to ensure that this is not the case:

      1. Terminate the aspnet_wp.exe process (from the Windows Task Manager)
      2. Open a Windows Explorer and navigate to C:\Windows(WINNT)\Microsoft.NET\Framework\v[YOUR_VERSION]\Temporary ASP.NET Files
      3. Delete all folders with names, corresponding to your Telerik projects, i.e. RadMenu, etc.
    • Delete your Visual Studio web project cache(s) - it should be located in C:\Documents and Settings\[YOUR USER]\VSWebCache.
    • Delete your browser cache: Tools -> Internet Options -> Delete Files....

  14. If you get a copyright message Show click here

    The copyright message appears only when using the trial version of Telerik RadMenu (the Developer versions of Telerik's controls do not throw copyright messages). Make sure you have downloaded the proper, Developer "DLL and Scripts only" file. You will recognize it by the Dev abbreviation in the file name.

4. Using the old ToolsFile.xml File and ConfigFile.xml file [valid for Telerik RadEditor and Telerik RadSpell only]

If you would like to use your old ToolsFile.xml and ConfigFile.xml files (which you backed up in #1 above), you can do so by copying them from the back-up to the RadControls\Editor folder (or RadControls\Spell respectively) of your web-application. When prompted to overwrite the other file, click "YES"

© 2002-2008 Telerik. All Rights Reserved.


Add/Remove Telerik RadMenu to the Global Assembly Cache

Telerik RadMenu v4.4 Send comments on this topic.
Add/Remove Telerik RadMenu to the Global Assembly Cache
See Also
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Add/Remove Telerik RadMenu to the Global Assembly Cache

Glossary Item Box

Add to Global Assembly Cache

There are two ways to add a control to the Global Assembly Cache (GAC):

Automatic

  1. Go to Start -> Settings -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 2.0 Configuration
  2. Expand the nodes and locate Assembly cache
  3. Right-click on it and select Add:

    Microsoft .NET 2.0 Configuration panel
  4. Browse to the Telerik bin directory and ctrl-highlight the needed DLL's (the demo and DictionaryConfiguration DLLs are not needed).
  5. Click Open.

Manual

  1. Run the .NET command prompt (Start -> Programs -> Microsoft VS.NET -> VS.NET Tools -> VS.NET prompt) and start the gacutil.exe tool with -i parameter (install) and the name of the control, e.g.

    Copy Code
    gacutil.exe -i "C:\Program Files\Telerik\Telerik RadMenu4.4\NET1NET2\bin\RadMenu.Net2.dll"

    You may also directly copy the dll files to the "\WINDOWS\assembly" (or "\WINNT\assembly") folder of your server - this is equivalent to the effect of the gacutil.exe utility.

  2. Change the machine.config file of the server and add a reference to the assembly in the GAC. The machine.config file is the configuration file for all web applications on the server. It is located at: "\WINDOWS\Microsoft.NET\Framework\[Framework Version]\CONFIG". It is similar in to the web.config file, but the web.config only works for the web application, in which it resides.

    Locate the <assemblies> tag (which should be under <configuration><system.web> <compilation>/<compilers>/<assemblies> ) Between the <assemblies> tag, you should enter something similar to:

    Copy Code
    <add assembly="AssemblyFileName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5edf592a9c40680c" />

    To get the information that goes into the assembly attribute (version, culture, PublicKeyToken), you can run the gacutil /l command, which will return a list of all the assemblies in the GAC. You will have to look for the one you just added and copy the entire line (minus the Custom=null part at the end).
    For example the following command:

    Copy Code
    gacutil -l RadMenu.Net2

    will return:

    Copy Code
    RadMenu, Version=4.4.0.0, Culture=neutral, PublicKeyToken=e8ab424810b6b9b5 Custom=null

    so the correct entry in the machine.config should be:

    Copy Code
    <add assembly="RadMenu.Net2, Version=4.4.0.0, Culture=neutral, PublicKeyToken=e8ab424810b6b9b5" />

After that you should be able to use the control in all the application on the server without having to copy it to the "bin" folder of each web-application.

Remove from Global Assembly Cache

In order to remove Telerik RadMenu from GAC, please use the following command:

Copy Code
gacutil.exe -u radmenu

See Also

The 'RadControls' Folder

© 2002-2008 Telerik. All Rights Reserved.


Deploying Telerik RadMenu on Shared Hosting

Telerik RadMenu v4.4 Send comments on this topic.
Deploying Telerik RadMenu on Shared Hosting
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Deploying Telerik RadMenu on Shared Hosting

Glossary Item Box

All Telerik controls are server controls and have to be installed on the web server in order to function properly. This also means that you will need to create the respective virtual directories and give the proper permissions (ASPNET [IIS5], NEtwork Service [IIS6]) in order to use them on the shared hosting.

If you have already created the application on your development machine

1. Copy/upload the compiled application via FTP to the production server, i.e. on the shared hosting. The application should reside in the inetpub/wwwroot folder.

2. Create a virtual directory for the application folder. Before you do this step, consult with your hosting provider on how this is to be accomplished. If the provider offers thorough instructions, use them instead of the ones below. If you do not have access to the Information Services console, ask your provider to set the application for you. If the provider does not offer instructions, then:

1. Locate the Internet Information Services console;

2. Navigate to the application folder;

3. Find the folder's Properties;

4. Create a virtual directory;

5. Remember the application name and click OK.

3. Give full permissions to the ASPNET user (if you are using IIS5) or to the Network Service account (using IIS6 or IIS7, Windows Server 2003, Windows Vista/Longhorn) on the application folder. Again, before doing this step, consult with your hosting provider on how this is to be accomplished. If the provider offers thorough instructions, use them instead of the ones below. Otherwise, contact your provider to set the permissions for you.

4. Run the project.

Notes.

As the proper operation of some Telerik RadEditor elements need some external files to be loaded, a RadControls folder instance is needed for the control to run.

There are two possible RadControls folder usages:

  • Copy the RadControls folder within your web-application:

    Manually copy the RadControls folder to the new location within your web application (for example, ~/Resources/). Specify its position via the RadControlsDir property of the control's declaration: <radE:RadEditor RadControlsDir="~/Resources/RadControls/" ...></radE:RadEditor>, where the "~" (tilde) symbol in the path represents your web-application root directory.
  • Copy the RadControls folder outside your web-application (this is the best scenario if you would like to share the RadControls folder across multiple web applications): Manually copy the RadControls to the new location using Windows Explorer. Create a virtual directory with a preferred name (e.g. RadControls) under each application's root which points physically to the same physical RadControls folder.

    The respective RadControls virtual directory should NOT be a web application but virtual directory only! You can find more information on the topic in the following KB article: (ID#728) Error Message: Could not load type 'Telerik.WebControls.Dialogs.Dialog'.

    If the Virtual subfolder alias is different than RadControls, specify the virtual folder position via the RadControlsDir property in the editor's declaration in your ASCX/ASPX file
    <radE:RadEditor RadControlsDir="~/MyRadControls/" ...></radE:RadEditor>

    More information on the topic is available in the following help article: The 'RadControls' folder.

If you plan to deploy the controls directly on the shared hosting

1. Log in your Client.NET account.

2. Go to "My licenses" and click on "My Purchases" (or "My Free Trials" if you are a trial user).

3. Locate the needed control, and click on it.

4. Click on the "Download" tab to download the Manual installation (ZIP) file.

5. On the server, create a "Telerik" folder in your "inetpub/wwwroot" folder on the server.

6. If you intend to use skins different from the default or if you plan to modify the JavaScript files, create a new folder named RadControls in the inetpub/wwwroot/Telerik folder.

7. Follow the instructions from the first case above.

© 2002-2008 Telerik. All Rights Reserved.


Multi Targeting in Visual Studio 2008

Telerik RadMenu v4.4 Send comments on this topic.
Multi Targeting in Visual Studio 2008
See Also
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Multi Targeting in Visual Studio 2008

Glossary Item Box

In Visual Studio 2008 you are able to build applications targeting multiple versions of the .NET Framework. Apart from ASP.NET 3.5, VS 2008 can open, edit and build ASP.NET 2.0 applications (applications with ASP.NET AJAX 1.0 as well). Visual Studio 2008 can also deploy these application on .NET 2.0 machines. You are able to easily build applications with RadControls targeting both ASP.NET 2.0 and ASP.NET 3.5.

See Also

External Link
See more information on how to use Multi Targeting in VS 2008

© 2002-2008 Telerik. All Rights Reserved.


Embedded Resources

Telerik RadMenu v4.4 Send comments on this topic.
Embedded Resources
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Embedded Resources

Glossary Item Box

All Telerik RadControls for ASP.NET have their web resources embedded in the control assembly. Each control automatically fetches the required resources from the web. Embedded Resources are easier to manage because they require that you only maintain a single DLL for each RadControl when you upgrade versions/deploy applications. You no longer need to include the JavaScripts and the other related files with the RadControls folder in the root of your application. If you use external resources, you'll simply need to make sure you keep your DLLs and RadControls folders in sync when you upgrade and deploy.

Note that you still need the RadControls folder if you want to use a skin other than the Default.

You can control this functionality by setting the boolean property UseEmbeddedScripts.

When UseEmbeddedScripts is set to true (by default) web resources are streamed by the built-in web resource handler using a query string (like WebResource.axd?d=HTLSHE...). This scenario is suitable for easier deployment (no RadControls required).
The backside of using the embedded resources is that sometimes web resources are not cached (e.g. when your site is in debug mode <compilation debug="true" />). In addition the long query strings are adding bulk to the HTML you are sending to the client. Using external resources, i.e. the RadControls folder may nearly halve the page size due to the shorter resource paths. Your mileage may vary depending on the RadControls you are using.

If you set UseEmbeddedScripts to false, the control will use the necessary resources (files) from the RadControls folder. This is appropriate for example for cases when the web resource handler is disabled or when you have applied some modifications to the JavaScript or CSS files used by the control.

None of the functionality of the controls will change. Switching this property would only mean that you have to keep a local copy of the RadControls folder with the JS files in your application, since you are not going to use the embedded ones.
You cannot combine both methods for getting web resources, i.e. you cannot make the control take its scripts as embedded resources and skin file from RadControls.

© 2002-2008 Telerik. All Rights Reserved.


Trust level

Telerik RadMenu v4.4 Send comments on this topic.
Trust level
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Trust level

Glossary Item Box

This topic refers the case you are trying to publish a site to a shared environment. The site is using the <RadControlName> component, where only the <RadControlName>.dll file exists in the /bin directory of the application along with the scripts directory (/RadControls/<ControlName>/Scripts) on the root.

All RadControls supports Medium trust level under shared hosting environment.

Note that a requirement for the RadControl is to have the trust level set to Medium at minimum - otherwise you may receive server error like the following:

Could not load type Telerik.RadMenuDesign.MenuComponentEditor from assembly mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

To modify the trust level setting please follow the instructions below:

Locate the machine.config file placed in the \Microsoft.NET\Framework\v2.0.50727\CONFIG folder on your production server. Open it for editing and change the following line:

machine.config Copy Code
<trust level="Medium" originUrl=""/>

Further information about the different trust level options and their policies you can find in the MSDN:

http://msdn2.microsoft.com/en-us/library/tkscy493.aspx

http://msdn2.microsoft.com/en-us/library/wyts434y.aspx

© 2002-2008 Telerik. All Rights Reserved.


Troubleshooting deployment on the production server

Telerik RadMenu v4.4 Send comments on this topic.
Troubleshooting deployment on the production server
Installation and deployment > Deploying Telerik RadMenu into ASP.NET Applications > Troubleshooting deployment on the production server

Glossary Item Box

Since the Q2 2006 release our controls utilize webresources which is a new feature of ASP.NET 2.0. There are cases in which this may cause problems. For some reason requesting the webresource handler (webresource.axd) returns error number 404. This javascript files used by the control should be streamed by the web resource handler. As a result of the aforementioned error this does not happen and you may experience JavaScript errors on the client.

Here some tips how the problem can be solved:

First approach

  1. Open IIS management snap-in ( e.g. run inetmgr.exe)
  2. Right click your website and choose properties
  3. Go to the "Home Directory" tab and click the "Configuration" button
  4. A dialog should pop out and you would see the mappings listbox
  5. Find the entry for the ".axd" extension and edit it by clicking the "Edit" button
  6. In the new dialog uncheck the "Verify if file exist" checkbox - which I suspect is causing the problem.

Second approach

Alternatively, if the steps above don't solve the issue, you can try creating an empty WebResource.axd file in the site root folder.

Third approach

You can try setting UseEmbeddedScripts property to false. Thus the control will use the scripts from RadControls/Menu/Scripts folder instead the embedded resource.

© 2002-2008 Telerik. All Rights Reserved.


What is DNN (DotNetNuke)

Telerik RadMenu v4.4 Send comments on this topic.
What is DNN (DotNetNuke)
DNN > What is DNN (DotNetNuke)

Glossary Item Box

DotNetNuke (DNN) is an open source Portal and Content Management Framework, based on Microsoft's .NET technology. DNN offers a robust, extensible and fully functional framework for the development of a broad range of commercial portal applications.

For more information on DNN, visit the official DotNetNuke web site here.

DotNetNuke is able to create the most complex content management systems entirely with its built-in features, yet also allows administrators to work effectively with add-ons, third party assemblies, and custom tools. DNN modules and skins are easy to find, purchase, or build. Site customization and functionality are limitless.

© 2002-2008 Telerik. All Rights Reserved.


DNN Concepts

Telerik RadMenu v4.4 Send comments on this topic.
DNN Concepts
DNN > DNN Concepts

Glossary Item Box

What is a skinobject?

Skins Objects are active elements which can be included in the static HTML markup of a skin file to produce a dynamic user interface. There are a number of default skin objects included with DotNetNuke for common portal functions such as login, status, and navigation.

Custom skin objects are packaged and installed using the same process as Custom Modules ( Private Assemblies ). All of the necessary skin object resource files are combined with a DotNetNuke manifest file (*.dnn ) and packaged into a ZIP file. Example of a manifest file:

XML - Manifest file Copy Code
<?xml version="1.0" encoding="utf-8" ?>
<dotnetnuke version="2.0" type="SkinObject">
<folders>
<folder>
<name>CompanyName - PageTitle</name>
<modules>
<module>
<controls>
<control>
<key>PAGETITLE</key>
<src>PageTitle.ascx</src>
<type>SkinObject</type>
</control>
</controls>
</module>
</modules>
<files>
<file>
<name>PageTitle.ascx</name>
</file>
<file>
<name>YourCompanyName.PageTitle.dll</name>
</file>
</files>
</folder>
</folders>
</dotnetnuke>

For ASCX skins then you will need to specify the @Register and actual user control tag in your skin file ( ie. <dnn:Login runat="server" id="dnnLogin" /> ). If you are creating HTML skins then you simply need to specify the token ( ie. [LOGIN] ).

Skin objects support the concept of named instances. For example, if you want to have two menu controls in your skin, you can specify [MENU:1] and [MENU:2] in your skin file. In most cases you will only be using a single instance of a skin object in your skin and in this case it is fine to use a singleton instance specification ( ie. [MENU] ).

Skin objects also contain attributes. Each skin object has its own set of supported attributes. If you are creating ASCX skins then you will need to specify the attribute directly in your skin file ( ie. <dnn:Login runat=”server” id=”dnnLogin” Text=”Signin” /> ). If you are creating HTML skins then you must include your attributes specifications in a separate file – this preserves the presentation of the HTML skin file for the designer. A skin package can contain a global attributes specification named “skin.xml” (or “container.xml” for containers) which applies to all skin files in the package. In addition, you can also override the global skin attribute specification with a skin specific attribute specification by providing a “skinfilename.xml” file. The skin uploader will merge the skin attributes with the HTML presentation file to create an ASCX skin file. The following XML fragment represents the structure of the attributes file:

XML - attributes Copy Code
<Objects>
<Object>
<Token>[LOGIN]</Token>
<Settings>
<Setting>
<Name>Text</Name>
<Value>Sign in</Value>
</Setting>
</Settings>
</Object>
</Objects>

There is a one to one correspondence of skin object declarations in your skin file (i.e. [MENU]) with the attribute specification in the XML file. This is also true for named instances.

What is a skin?

Skins are customized and interchangeable sets of graphics which allow administrators to easily change the look of their websites, without having to reorganize their content. In "skinning" a site, administrators can completely change the look of their portal without the need to reorganize content – all at the click of a button.

NOTE:

Since skins are based on ASCX files which are essentially executable once they are added to an ASPX page, there is some risk that malicious script could be inserted into the skin files – putting the entire installation in danger. Be sure to download skins only from trusted locations.

How do skins work?

DNN uses placeholders to separate the skin objects from the static markup which designers can then include in their skin. Placeholders are simply [TOKEN] text, which uniquely identify a skin object. To mitigate the performance impact of replacing these placeholders at runtime, DNN features a simple skin upload mechanism which does the substitution of placeholders with the skin objects to produce a user control file (.ascx) which can then be rendered by the engine. This pre-processing occurs only once when the skin is uploaded.

Skins can be applied at a host (the whole DNN install), portal (only one site), or tab (single page) level. Skins can also be applied at the module level (in this case they are referred to as Containers). All skin files are organized under the Portals folder. Child assignments are able to override parent assignments (i.e. a skin applied at the tab level should override a skin applied at the portal level).

A skin or container package is comprised of multiple files which constitute a complete skin:

*.htm, *.html files – abstract skin definition files which will be processed by the skin uploader to create an *.ascx file

*.ascx files – skin definition user controls which are precompiled in the format required by the skin engine.

*.css files – styles sheets related to skins

*.gif, *.jpg, *.jpeg, *.png – supporting graphics files

*.* – any other resource files required for the skin (allowable file extensions are secured by the Host “File Upload Extensions” setting)

Skin definitions can be created using two different methods, HTML or ASCX ( user controls ). Basically the only difference between the two methods is the file extension of the skin definition file and the use of tokens versus actual user control tags.

Content panes are the containers for the content modules which are automatically injected at runtime. Content panes are simply HTML tags with some custom attributes specified specifically an ID and a RUNAT=”SERVER” attribute ( ie. <TD ID=”ContentPane” RUNAT=”SERVER”>).

What is a Container?

As mentioned earlier, containers are skin definitions which can be applied to content modules. A container is defined in exactly the same manner as a skin except for the fact that there are a different set of skin objects used in containers.

What is a module?

Simply, they are modular pieces of code which provide some form of specific functionality to the user, and are grouped together in units to form complete web pages. These modules can be easily added, edited, deleted, restored, moved around on a page, or transferred to other pages. DotNetNuke installation includes over 25 free modules. These are: Account LogIn, Announcements, Banners, Contacts, Discussion, Documents, Events List/Calendar, FAQs, Feedback, IFrame, Image, Links, News Feed (RSS), Search Input, Search Results, Service Directory, Survey, Text/HTML, User Accounts, User Defined Table, Users Online, Weblog Calendar, Weblog Recent List, Weblog Referrals List, Weblogs, and XML/XSL.

© 2002-2008 Telerik. All Rights Reserved.


RadControls for DNN

Telerik RadMenu v4.4 Send comments on this topic.
RadControls for DNN
DNN > RadControls for DNN

Glossary Item Box

The Telerik RadControls suite is the most innovative and comprehensive tool set for ASP.NET development, tailored for seamless integration with the DotNetNuke project. This integrated collection of controls allows professionals to build web-solutions with the UI richness and responsiveness of desktop applications. From the WYSIWYG editor, to navigation, the RadControls DotNetNuke Edition allows you to substantially enhance the interface and usability of your DotNetNuke projects.

Telerik offers the following products for DNN:

  • RadMenu - SkinObject and a sample skin
  • RadPanelbar - SkinObject and a sample skin
  • RadTabstrip - SkinObject and and a sample skin
  • RadTreeview - SkinObject, a sample skin, and a module
  • RadEditor - HtmlEditorProvider (which can be used instead of the default DNN editor)
  • RadCalendar - SkinObject(which can be used instead of the default DNN calendar) and a module
  • RadGrid - a sample module
  • RadRotator - a module
  • RadAjax - a sample module

A SkinObject can be used as a component of a DNN skin. A SkinObject by itself is useless unless you make it a part of a skin. For example, consider the sample RadMenu skin:

SkinObject and skin
Enlarge Click to enlarge

A module can be inserted in a pane to provide some functionality. For example consider the RadCalendar module:

RadCalendar module
Enlarge Click to enlarge

© 2002-2008 Telerik. All Rights Reserved.


How to download RadMenu for DNN

Telerik RadMenu v4.4 Send comments on this topic.
How to download RadMenu for DNN
DNN > How to download RadMenu for DNN

Glossary Item Box

  1. Log in your Client.NET account.
  2. Go to Products -> RadControls for ASP.NET -> Download Trial
  3. Click on the individual products tab to expand the list of controls

    Enlarge Click to enlarge
  4. Click on a control to expand the list of available files for download

    Enlarge Click to enlarge
  5. Download the DNN module or skin

    Enlarge Click to enlarge

© 2002-2008 Telerik. All Rights Reserved.


DotNetNuke integration manual

Telerik RadMenu v4.4 Send comments on this topic.
DotNetNuke integration manual
DNN > DotNetNuke integration manual

Glossary Item Box

This guide will explain how to integrate RadMenu 4.x in the DotNetNuke Portal version 4.5. It assumes that you have DotNetNuke installed.

Step 1 - Installation

If you do not have the RadMenu skinobject yet, download the archive from your Client.Net account.

  1. Unpack the archive in a folder of your choice. You should have the following files - Telerik.DNN.SkinObjects.Menu.zip, RadMenu.zip, a skinning whitepaper, and Skinobjects-Menu-Readme.htm.
  2. If you have purchased a Developer license, then you need to open the Telerik.SkinObjects.Menu.zip archive and replace the RadMenu.dll file with the one from your developer installation(usually from C:\Program Files\telerik\).
  3. Open your browser and go to the DotNetNuke portal. Log in with a SuperUser account(host). Go to the menu Host>Module Definitions. From the bottom of the page click on Install New Module. Point to the Telerik.DNN.SkinObjects.Menu.zip file, click Open and then click Install New Module.
  4. Go to the skins page(Admin>Skins or Host>Skins) and click on the Upload Skin link located near the bottom of the page. Select the skin you will use with RadMenu or select the sample skin that comes with the RadMenu skinobject - RadMenu.zip. Click Open and then Install Skin Package. After the skin installation is complete you can go back to the Skins page and preview/apply the new skin.
  5. Congratulations! You have successfully integrated RadMenu in your DotNetNuke project.

Step 2 - Customization

Customizing RadMenu after its integration in DNN can become a bit more difficult than what you are used to, since there is no XML definition file for the structure of the menu. The items are generated dynamically in order to reflect all page changes in the DNN menu structure. This brings a problem for people who are used to tweaking the XML file for best results. However, we tried to minimize this problem by exposing as many properties as possible in the skinobject. You can add those properties from the skin definition file(.ascx) (method A) or in the XML definition file for your skin (method B). For example if you want to tell the menu where to look for its images you will need to set the its ImagesBaseDir property.

Method A

This method relies on directly modifying the ascx file. However, if you parse the skin package the changes will not persist - the xml settings will override your modified ascx file. The advantage of this method is that you can tweak the ascx file and immediately see the changes after refreshing the page.

If your skin file comes with a ready to use control file(.ascx) the menu should look something like this:
First you should register the control:

ASPX Copy Code
<%@ Register TagPrefix="dnn" TagName="RADMENU" Src="~/DesktopModules/RadMenu/RadMenu.ascx" %>

Then you should put it somewhere in your skin:

Copy Code
<dnn:RADMENU runat="server" id= "dnnMENU" />

You add properties in the same way as you would do on a normal RadMenu:

Copy Code
<dnn:RADMENU runat="server" id="dnnMENU" ImagesBaseDir="~/Portals/_default/Skins/myskin/Img/"/>

Method B

This is a more indirect method which modifies the xml file which after parsing produces the ascx file from method A.

If you are building skins using an HTML editor and the DNN skin parser:
First place the RadMenu token([RADMENU]) somewhere in your skin, then you need to add the properties to the XML file that holds information about the tokens you are using. For example:

Copy Code
<Object>
<Token>[RADMENU]</Token>
<Settings>
<Setting>
<Name>ImagesBaseDir</Name>
<Value>~/Portals/_default/Skins/myskin/Img/</Value>
</Setting>
</Settings>
</Object>

Step 3 - Skinning whitepaper

Consult the skinning whitepaper for a list of all properties supported by the RadMenu skinobject.

Known Issues

The actions menu skinobject throws an exception if Medium trust level has been selected from the Web.config file. If you see an exception similar to this:
DotNetNuke.Services.Exceptions.PageLoadException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
then you should remove the following line from your Web.config file: <trust level="Medium" originUrl="http://localhost/.*" />

© 2002-2008 Telerik. All Rights Reserved.


API reference (skinning whitepaper)

Telerik RadMenu v4.4 Send comments on this topic.
API reference (skinning whitepaper)
DNN > API reference (skinning whitepaper)

Glossary Item Box

Attribute | Value | Description
RadControlsDir |  | The location of the RadControls folder for RadMenu
ExpandAnimationType and ExpandAnimationDuration | AnnimationSettings that represent the expand animation. | Gets the settings for the animation played when an item opens.
CollapseAnimationType and CollapseAnimationDuration | An AnnimationSettings that represents the collapse animation. | Gets the settings for the animation played when an item closes.
IsContext | False | a value indicating whether the menu is context or not.
EnableScreenBoundaryDetection |  | a value indicating whether the screen boundary detection will be applied when expanded.
ContextMenuElementID |  | the ID of the html element which if right-clicked will display the context menu.
ClickToOpen | True if the root items open on mouse click; otherwise false. The default value is false. | a value indicating whether root items should open on mouse click.
SkinsPath | A string specifying the relative path to the folder which contains RadMenu skins. The default value is "~/RadControls/Menu/Skins". | the relative path of the folder containing the skins. This property accepts the *SkinPath* token.
Skin | A String specifying the skin. The default value is Default. | the skin used by RadMenu.
CausesValidation | true if validation is performed when an item is selected; otherwise, false. The default value is true. | a value indicating whether validation is performed when an item within the RadMenu control is selected.
ExpandDelay | An integer specifying the timeout measured in milliseconds. The default value is 0 which means that menu items open immediately. | a value indicating the timeout after which a menu item starts to open.
Flow | One of the ItemFlow values. The default value for top level items is Horizontal. | a value indicating the way top level items will flow.
CollapseDelay | An integer specifying the timeout measured in milliseconds. The default value is 500 (half a second). | a value indicating the timeout after which a menu item starts to close.
OnClientMouseOver | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when the mouse moves over a menu item in the RadMenu control.
OnClientMouseOut | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when the mouse moves out of a menu item in the RadMenu control.
OnClientItemFocus | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when a menu item gets focus.
OnClientItemBlur | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called after an item loses focus.
OnClientItemClicking | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when a menu item is clicked.
OnClientItemClicked | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called after a menu item is clicked.
OnClientItemOpen | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when a group of child items opens.
OnClientItemClose | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called when a group of child items closes.
OnClientLoad | A string specifying the name of the JavaScript function that will handle the event. The default value is empty string. | a value indicating the client-side event handler that is called after the RadMenu client-side object is initialized.
CssClass |  | A CSS class to be applied to the menu
Style |  | A list of style properties for the menu
Height |  | sets the height of RadMenu
Width |  | sets the width of RadMenu
ItemCssClass |  | If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
ItemDisabledCssClass | The CSS class applied when the menu item is disabled. The default value is "disabled". | the Cascading Style Sheet (CSS) class applied when the menu item is disabled. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
ItemExpandedCssClass | The CSS class applied when the menu item is opened. The default value is "expanded". | the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible). If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
ItemFocusedCssClass | The CSS class applied when the menu item is focused. The default value is "focused". | the Cascading Style Sheet (CSS) class applied when the menu item is focused. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
ItemClickedCssClass | The CSS class applied when the menu item is clicked. The default value is "clicked". | the Cascading Style Sheet (CSS) class applied when the menu item is clicked. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
ItemImageUrl | The path to the image to display for the item. The default value is empty string. | the path to an image to display for the item. This property accepts the special tokens *SkinPath* and *PageName*.
ItemImageOverUrl | The path to the image to display when the user moves the mouse over the item. The default value is empty string. | the path to an image to display for the item when the user moves the mouse over the item. This property accepts the special tokens *SkinPath* and *PageName*.
ItemTarget | The target window or frame to load the Web page linked to when the Item is selected | the target window or frame to display the Web page content linked to when the menu item is clicked.
ItemBackColor |  | inherited from the default webcontrol class
ItemBorderColor |  | inherited from the default webcontrol class
ItemBorderWidth |  | inherited from the default webcontrol class
ItemBorderStyle |  | inherited from the default webcontrol class
ItemForeColor |  | inherited from the default webcontrol class
ItemHeight |  | inherited from the default webcontrol class
ItemWidth |  | inherited from the default webcontrol class
RootItemCssClass |  | If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
RootItemDisabledCssClass | The CSS class applied when the menu item is disabled. The default value is "disabled". | the Cascading Style Sheet (CSS) class applied when the menu item is disabled. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
RootItemExpandedCssClass | The CSS class applied when the menu item is opened. The default value is "expanded". | the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible). If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
RootItemFocusedCssClass | The CSS class applied when the menu item is focused. The default value is "focused". | the Cascading Style Sheet (CSS) class applied when the menu item is focused. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
RootItemClickedCssClass | The CSS class applied when the menu item is clicked. The default value is "clicked". | the Cascading Style Sheet (CSS) class applied when the menu item is clicked. If using the item or level css options of the skinobject then the level and item number will be added to the name of the CSS class.
RootItemImageUrl | The path to the image to display for the item. The default value is empty string. | the path to an image to display for the item. This property accepts the special tokens *SkinPath* and *PageName*.
RootItemImageOverUrl | The path to the image to display when the user moves the mouse over the item. The default value is empty string. | the path to an image to display for the item when the user moves the mouse over the item. This property accepts the special tokens *SkinPath* and *PageName*.
RootItemTarget | The target window or frame to load the Web page linked to when the Item is selected | the target window or frame to display the Web page content linked to when the menu item is clicked.
RootItemBackColor |  | inherited from the default webcontrol class
RootItemBorderColor |  | inherited from the default webcontrol class
RootItemBorderWidth |  | inherited from the default webcontrol class
RootItemBorderStyle |  | inherited from the default webcontrol class
RootItemForeColor |  | inherited from the default webcontrol class
RootItemHeight |  | inherited from the default webcontrol class
RootItemWidth |  | inherited from the default webcontrol class
GroupFlow | One of the ItemFlow enumeration values. The default value is Vertical. | the flow of child items.
GroupExpandDirection | One of the ExpandDirection enumeration values. The default value is Auto. | the direction in which child items will open.
GroupOffsetX | An integer specifying the horizontal offset of child menu items (measured in pixels). The default value is 0 (no offset). | a value indicating the horizontal offset of child menu items considering their parent.
GroupOffsetY | An integer specifying the vertical offset of child menu items (measured in pixels). The default value is 0 (no offset). | a value indicating the vertical offset of child menu items considering their parent.
GroupWidth | A Unit that represents the width of the child item group. The default value is Unit.Empty. | a value indicating the width of child menu items (the whole item group).
GroupHeight | A Unit that represents the height of the child item group. The default value is Unit.Empty. | a value indicating the height of child menu items (the whole item group).
SelectedPathHeaderItemCss |  | The CSS class for the root group item that is currently selected or one of it's children is currently selected
SelectedPathItemCss |  | The CSS class for the item that is currently selected or one of its children is selected. Note: does not apply to the root menu group. See SelectedPathHeaderItemCss.
SelectedPathItemImage |  | This image(breadcrumb) will be shown if the menu item or one of its children items is selected. The image accepts the tokens *PageName* and *SkinPath*.
SelectedPathHeaderItemImage |  | This image(breadcrumb) will be shown if the menu item or one of its children items is selected. The image accepts the tokens *PageName* and *SkinPath*.
EnableToolTips | False | If set to true, the page description will be displayed as a tooltip when you hover over the menu item.
ImagesOnlyMenu | False | The menu item uses the icon file specified for the page instead of the page name. However, if no icon file is specified, then the page name is used as the item text.
EnableLevelCss | False | If set to true, "Level" and the level of the menuitem will be added to the beginning of its CSS class. Works for ItemCssClass, ItemCssClassOver, ItemCssClassClicked, ItemCssClassDisabled. For example: if ItemCssClass = "menu_item" then the menu will use "Level0menu_item" for the root group of items, "Level1menu_item" for the level 1 items and so on.
EnableItemCss | False | If set to true, each item in the menu that is not in the root group will have its CSS class changed according to the position of that item in the menu group. The number will be appended in the end of the CSS classes ItemCssClass, ItemCssClassOver, ItemCssClassClicked, ItemCssClassDisabled. For example: if ItemCssClass = "menu_item" then the menu will use "menu_item1" for the first item, "menu_item2" for the second and so on. This property can be combined with EnableLevelCss.
EnableRootItemCss | False | If set to true, each item in the root menu will have its CSS class changed according to the position of that item in the group. The number will be appended in the end of the CSS classes ItemCssClass, ItemCssClassOver, ItemCssClassClicked, ItemCssClassDisabled. For example: if ItemCssClass = "menu_item" then the menu will use "menu_item1" for the first item, "menu_item2" for the second and so on. This property can be combined with EnableLevelCss.
MaxLevelNumber | 10 | If EnableGroupLevelCss or EnableLevelCss are set to True, this property limits the number of levels that will use the modified CSS classes. If there are more levels after MaxLevelNumber, their CSS classes will be the default ones. For example when MaxLevelNumber = 3 and ItemCssClass = "menu_item" all items after level 3 will have their ItemCssClass set to "menu_item", while all items below level 3 will have the ItemCssClass and the value of the level "Level0menu_item"," Level0menu_item" etc.
MaxItemNumber | 20 | If EnableItemCss or EnableRootItemCss are set to True, this property limits the number of items that will use the modified CSS classes. If there are more levels after MaxLevelNumber, their CSS classes will be the default ones. For example when MaxItemNumber = 3 and ItemCssClass = "menu_item" all items after the third one will have their ItemCssClass set to "menu_item", while the first three will have the ItemCssClass and the order of the item - "menu_item1","menu_item2", "menu_item3".
MaxLevel |  | The maximum number of levels to display. Useful if you have a big menu and would like to show only a part of it. If set to 0 only the root group will be shown.
ShowOnlyCurrent |  | If set to "ChildItems" the menu will render only the child items of the current page. If set to "CurrentItem" it will render child items plus the current page. If set to "RootItem" then the menu will render all child items of the root group item that is selected or is a part of the path to the currently selected menu item. If you specify a Page ID, the menu will display only the child items of the specified page. You can also specify a the name of the page instead of its ID- the format is "PageItem:Home"(where "Home" is the page name). Allowed values are "CurrentItem", "RootItem", and the ID or name of a DNN Page.
EnableItemId | False | If set to "True", the menu will generate an ID property for each menu item. The ID will have a value "M_" + the database ID of the page. For example "M_36"
EnablePageIcons | True | Specifies whether to show the page icons as a left logo of the menu item.
HeaderFirstItem |  | An image to be displayed at the start of the header menu group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
HeaderSeparator |  | An image to be displayed between the menu items in the header group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
HeaderLastItem |  | An image to be displayed at the end of the header menu group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
HeaderFirstItemCssClass |  | A CSS class name, which will be applied to HeaderFirstItem.
HeaderFirstItemCssClassClicked |  | A CSS class name, which will be applied to HeaderFirstItem when the user clicks on it.
HeaderFirstItemCssClassOver |  | A CSS class name, which will be applied to HeaderFirstItem when the mouse hovers over it.
HeaderSeparatorCssClass |  | A CSS class name, which will be applied to HeaderSeparator.
HeaderSeparatorCssClassClicked |  | A CSS class name, which will be applied to HeaderSeparator when the user clicks on it.
HeaderSeparatorCssClassOver |  | A CSS class name, which will be applied to HeaderSeparator when the mouse hovers over it.
HeaderLastItemCssClass |  | A CSS class name, which will be applied to HeaderLastItem .
HeaderLastItemCssClassClicked |  | A CSS class name, which will be applied to HeaderLastItem when the user clicks on it.
HeaderLastItemCssClassOver |  | A CSS class name, which will be applied to HeaderLastItem when the mouse hovers over it.
childGroupFirstItem |  | An image to be displayed at the start of a child menu group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
childGroupSeparator |  | An image to be displayed between the menu items in a child group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
childGroupLastItem |  | An image to be displayed at the end of a child menu group. Can contain the token *SkinPath*, which will be replaced with the current skin's path.
childGroupFirstItemCssClass |  | A CSS class name, which will be applied to childGroupFirstItem.
childGroupFirstItemCssClassClicked |  | A CSS class name, which will be applied to childGroupFirstItem when the user clicks on it.
childGroupFirstItemCssClassOver |  | A CSS class name, which will be applied to childGroupFirstItem when the mouse hovers over it.
childGroupSeparatorCssClass |  | A CSS class name, which will be applied to childGroupSeparator.
childGroupSeparatorCssClassClicked |  | A CSS class name, which will be applied to childGroupSeparator when the user clicks on it.
childGroupSeparatorCssClassOver |  | A CSS class name, which will be applied to childGroupSeparator when the mouse hovers over it.
childGroupLastItemCssClass |  | A CSS class name, which will be applied to childGroupLastItem.
childGroupLastItemCssClassClicked |  | A CSS class name, which will be applied to childGroupLastItem when the user clicks on it.
childGroupLastItemCssClassOver |  | A CSS class name, which will be applied to childGroupLastItem when the mouse hovers over it.
EnableUserMenus | True | A Boolean parameter, specifying whether or not to show the normal(non-admin) menu pages in the menu.
EnableAdminMenus | True | A Boolean parameter, specifying whether or not to show the admin(Admin and Host) pages in the menu.
CopyChildItemLink | False | Some menu items have disabled links(for example "Admin", "Host" etc.). If you have a menu with MaxLevel=0, then these menus will be inaccessible because you cannot click on "Admin" or "Host" items. With this option set to True, all menu items that do not correspond to a page will point to their first child item. For example clicking on the Admin menu will redirect the user to "Admin>Site Settings"(the first child page in the admin menu).
ShowPath | False | If set to true, the current page item and its parents will be displayed as focused. You can change the default CSS class using the SelectedPath skinobject attributes.
PagesToExclude |  | A comma-separated list of pages IDs OR Names that will NOT be included in the menu navigation control.

© 2002-2008 Telerik. All Rights Reserved.


How to change the skin of the RadMenu DNN skin object

Telerik RadMenu v4.4 Send comments on this topic.
How to change the skin of the RadMenu DNN skin object
DNN > How to change the skin of the RadMenu DNN skin object

Glossary Item Box

This is a step-by-step guide on how to change the skin of the RadMenu DNN skin object. It assumes that you have a default installation of DNN and RadMenu skin object.

  1. Locate your menu skins from the zip file:

    Telerik.DNN.SkinObjects.Menu.zip\Resources.zip\RadControls\Menu\Skins
  2. Drag and drop the desired skins to the Menu folder located at:

    DotNetNuke\Website\Portals\_default\Skins\RadMenu\Menu

    By default you only have the dnn skin in this folder.
  3. Open the skin.ascx file located at:

    DotNetNuke\Website\Portals\_default\Skins\RadMenu
  4. Find the RadMenu and set its Skin property to skin of your choice. For example:

    Copy Code
    <dnn:RADMENU runat="server" id="dnnRADMENU" SkinsPath="*SkinPath*/Menu/" Skin="CssGreen" />

If you want to tweak the skin, follow these steps:

  1. Go to the skin's folder and open the styles.css file:

    DotNetNuke\Website\Portals\_default\Skins\RadMenu\Menu\CssGreen -->styles.css
  2. Modify the style.css file, save the changes and refresh the web page with the RadMenu skin object. You should see the changes immediately.

© 2002-2008 Telerik. All Rights Reserved.


How to use RadMenu instead of the default solpartactions menu

Telerik RadMenu v4.4 Send comments on this topic.
How to use RadMenu instead of the default solpartactions menu
DNN > How to use RadMenu instead of the default solpartactions menu

Glossary Item Box

By default, DNN uses the solpart menu as a pop-up action menu:

default solpartactions menu

You can use RadMenu instead:

To do this, you need to replace

Copy Code
<dnn:ACTIONS ... />

with

Copy Code
<dnn:RADMENUACTIONS ... />

Suppose that you want to use the Dnn-Gray container with the image header - color background style:

Dnn - Gray container

Below are two step-by-step methods which show exactly how to replace the solpartactions menu with RadMenu.

Method A

This method relies on directly modifying the ascx file.

  1. Find the Image Header - Color Background.ascx file located at:

    DotNetNuke\Website\Portals\_default\Containers\DNN-Gray
  2. Open this file for edit.
  3. Register the RADMENUACTIONS tag by adding the following line of code:

    Copy Code
    <%@ Register TagPrefix="dnn" TagName="RADMENUACTIONS" Src="~/DesktopModules/RadMenu/RadMenuActions.ascx" %>
  4. Replace

    Copy Code
    <dnn:ACTIONS ... />
    with

    Copy Code
    <dnn:RADMENUACTIONS ... />

  5. Set additional properties for RadMenu if desired. For example you can set the Skin property:

    Copy Code
    <dnn:RADMENUACTIONS runat="server" id="dnnRADMENUACTIONS" Skin="CssGreen" />

Method B

This is a more indirect method which modifies the htm and xml files which after parsing produce the ascx file from method A.

  1. Find and open for edit the container.xml file located at:

    DotNetNuke\Website\Portals\_default\Containers\DNN-Gray
  2. Replace <Token>[ACTIONS]</Token> with <Token>[RADMENUACTIONS]</Token>
  3. Set RadMenu additional properties if needed. For example set the Skin property to CssGreen:

    <Token>[RADMENUACTIONS]</Token>
    <Settings>
    <Setting>
    <Name>Skin</Name>
    <Value>CssGreen</Value>
    </Setting>
    </Settings>
  4. Save changes to the container.xml file
  5. Next, find and open for edit the Image Header - Color Background.htm file located in the same directory as container.xml.
  6. Replace [ACTIONS] with [RADMENUACTIONS]
  7. Save changes to Image Header - Color Background.htm file
  8. Parse the skin package to update the Image Header - Color Background.ascx file

    Parse Skin

© 2002-2008 Telerik. All Rights Reserved.


How to create an ImageOnly menu with ShowPath functionality

Telerik RadMenu v4.4 Send comments on this topic.
How to create an ImageOnly menu with ShowPath functionality
DNN > How to create an ImageOnly menu with ShowPath functionality

Glossary Item Box

This is a step-by-step guide on how to create an ImageOnly RadMenu with Show Path functionality. The menu uses only images for the different states (normal, hover and selected) and indicates on which page the user is by showing the corresponding menu item as selected.

The challenge with implementing such functionality is how to set a specific image for each menu item. We solve this problem using a neat trick - the *PageName* token replaces the first part of the image name.

  1. Create images for the three states of the menu items (normal, over and selected) and name them according to the following convention:

    [Page name]_Normal.[ext]
    [Page name]_Over.[ext]
    [Page name]_Selected.[ext]

    For example, if your site has the following structure:

    home products about us
    - dnn
    - asp net
    - winforms

    you should have the following images:

    home_Normal.gif home_Over.gif home_Selected.gif
    products_Normal.gif products_Over.gif products_Selected.gif
    about us_Normal.gif about us_Over.gif about us_Selected.gif
    dnn_Normal.gif dnn_Over.gif dnn_Selected.gif
    asp net_Normal.gif asp net_Over.gif asp net_Selected.gif
    winforms_Normal.gif winforms_Over.gif winforms_Selected.gif
  2. Once you have prepared the menu items' images as suggested in step one, copy them to the folder of your dnn web site located in the portals folder . For example, if you create a new portal for a new site to test this approach, copy the images in:

    C:\DotNetNuke\Website\Portals\1
  3. Find the DNN RadMenu in the skin.ascx file located at

    C:\DotNetNuke\Website\Portals\_default\Skins\RadMenu (assuming you have a default installation)
  4. Set the dnn RadMenu as follows:

    Copy Code
    <dnn:RADMENU runat="server" id="dnnRADMENU" SkinsPath="*SkinPath*/Menu/"

    Skin="none"
    ShowPath="true"
    ImagesOnlyMenu="true"

    RootItemImageUrl="~/Portals/1/*PageName*_Normal.gif"
    ItemImageUrl="~/Portals/1/*PageName*_Normal.gif"

    RootItemImageOverUrl="~/Portals/1/*PageName*_Over.gif"
    ItemImageOverUrl="~/Portals/1/*PageName*_Over.gif"

    SelectedPathItemImage="~/Portals/1/*PageName*_Selected.gif"
    SelectedPathHeaderItemImage="~/Portals/1/*PageName*_Selected.gif"

    style="float:right;" />

Note, that there are two separate properties which you have to set if you want images for both the root and the child items. If, for example, you want images only for the root items, just set the corresponding properties for the root items only.

Also, note how the *PageName* token replaces the first part of the image name.

© 2002-2008 Telerik. All Rights Reserved.


Overview of Telerik RadMenu structure and appearance

Telerik RadMenu v4.4 Send comments on this topic.
Overview of Telerik RadMenu structure and appearance
See Also
Feature overview > Overview of Telerik RadMenu structure and appearance

Glossary Item Box

Structure

A menu control consists of items grouped in the Items collection. Each RadMenuItem can also contain an Items collection with its own child items, etc., as demonstrated in Pic. 1.

Pic. 1

The Items collection

ASPX Copy Code
<rad:RadMenu ID="RadMenu1">
<Items>
<rad:RadMenuItem Text="Root Item 1">
<Items>
<rad:RadMenuItem Text="Child Item 1.1">
<Items>
<rad:RadMenuItem Text="Child Item 1.1.1">
</rad:RadMenuItem>
<rad:RadMenuItem Text="Child Item 1.1.2">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Child Item 1.2">
<Items>
<rad:RadMenuItem Text="Child Item 1.2.1">
</rad:RadMenuItem>
<rad:RadMenuItem Text="Child Item 1.2.2">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Root Item 2">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

The menu structure can be defined using one of the following methods:

  • Inline
  • Using Visual Studio designer;

  • Programmatically using the provided API;

  • By binding the control to a data source.

Appearance

The visual appearance can be defined using skins.

See Also

Multi-row menu
Layout (Vertical/Horizontal flow)
Hierarchical menu
Scrollable menu
Keyboard support
Right-to-left support
Separators
Create scrollable items

© 2002-2008 Telerik. All Rights Reserved.


Scrollable menu

Telerik RadMenu v4.4 Send comments on this topic.
Scrollable menu
See Also
Feature overview > Scrollable menu

Glossary Item Box

An expanded group of child items automatically becomes scrollable in case its width or height (depending on their flow) is too small to accommodate the whole group.

  • If the RadMenuItem.GroupSettings.Height property is specified and the size of the content exceeds that height, vertical scrolling will be enabled.
  • If the RadMenuItem.GroupSettings.Width property is specified and the size of the content exceeds that width, horizontal scrolling will be enabled.

Example

The menu in Pic. 1 below has three root items. The first two are scrollable. The Flow property for each group is set so that the first group scrolls horizontally, while the second one is vertical.

Pic. 1

A scrollable menu

ASPX Copy Code
<rad:radmenu id="RadMenu1" runat="server" Skin="Outlook">
<Items>
<rad:RadMenuItem Text="Corporate">
<GroupSettings Height="100px"></GroupSettings>
<Items>
<rad:RadMenuItem Text="Mission Statement"></rad:RadMenuItem>
<rad:RadMenuItem Text="Strategic Plan"></rad:RadMenuItem>
<rad:RadMenuItem Text="Executive Bios"></rad:RadMenuItem>
<rad:RadMenuItem Text="Contact Us"></rad:RadMenuItem>
<rad:RadMenuItem Text="Careers"></rad:RadMenuItem>
<rad:RadMenuItem Text="Client Highlights"></rad:RadMenuItem>
<rad:RadMenuItem Text="By Email"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Products">
<GroupSettings Width="200px" Flow="Horizontal"></GroupSettings>
<Items>
<rad:RadMenuItem Text="Automotive"></rad:RadMenuItem>
<rad:RadMenuItem Text="Machinery"></rad:RadMenuItem>
<rad:RadMenuItem Text="Software"></rad:RadMenuItem>
<rad:RadMenuItem Text="Customer Goods"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Contact Us">
<Items>
<rad:RadMenuItem Text="Europe"></rad:RadMenuItem>
<rad:RadMenuItem Text="Asia"></rad:RadMenuItem>
<rad:RadMenuItem Text="America"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:radmenu>

See Also

Scrolling online example
Overview of Telerik RadMenu structure and appearance
Multi-row menu
Layout (Vertical/Horizontal flow)
Hierarchical menu
Keyboard support
Right-to-left support

© 2002-2008 Telerik. All Rights Reserved.


Context menu

Telerik RadMenu v4.4 Send comments on this topic.
Context menu
See Also
Feature overview > Context menu

Glossary Item Box

To create a context menu, set the IsContext property to True.

See Also

Context Menu online example
For a page or a specific element
Integration with treeview and grid
Popup menu

© 2002-2008 Telerik. All Rights Reserved.


Click To Open

Telerik RadMenu v4.4 Send comments on this topic.
Click To Open
See Also
Feature overview > Click To Open

Glossary Item Box

Setting the ClickToOpen property to true expands the children of a root item only when the user clicks the parent item. If the property is false (the default value), the child items expand on mouse hover.

Child items do not collapse automatically, but only when the user clicks outside the menu.

Example

In the menu shown in Pic. 1, you can click any root level item to enable expanding the Products section. Once clicked, the menu will expand or collapse this section on mouse hover.

Pic. 1

The Products section is expanded

ASPX Copy Code
<rad:RadMenu id="RadMenu1" runat="server" ClickToOpen="True">
<Items>
<rad:RadMenuItem runat="server" Text="Company">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Products">
<Items>
<rad:RadMenuItem runat="server" Text="Try">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Purchase">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Services">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Contact Us">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Click to Open online example
Overview of Telerik RadMenu structure and appearance
Expand and Collapse Behavior

© 2002-2008 Telerik. All Rights Reserved.


Keyboard support

Telerik RadMenu v4.4 Send comments on this topic.
Keyboard support
See Also
Feature overview > Keyboard support

Glossary Item Box

A critical requirement for software accessibility is keyboard support as a complete alternative to pointing devices (mouse, etc.).

Keyboard support is comprised of access keys, keyboard navigation, and keyboard shortcuts. Telerik RadMenu will seamlessly switch between mouse and keyboard navigation, just like in desktop applications.

Using the AccessKey property, you can associate an activation combination (access key) which will focus on the particular menu item and enable keyboard navigation. When there are multiple menus on a given page, each of them may have a different activation combination.

Setting access keys

AccessKey is a property of the RadMenuItem class. AccessKey sets the keyboard shortcut that may be used to activate a menu item. The value of the AccessKey property can only be a single character. A key combination between [ALT] and the selected character key moves the focus to the respective item. (You can subsequently use the arrow keys for navigation; see below.)

To set a keyboard shortcut to a menu item, simply set the AccessKey property to the desired key. For example, <rad:RadMenuItem Text="Test" AccessKey="T"> will be fired when you press [Alt]+[T].

In Opera, access keys work by pressing Shift+ESC, then pressing the assigned access key.

Example

Pic. 1

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" Runat="server">
<Items>
<rad:RadMenuItem Runat="server" Text="Company" AccessKey="C"></rad:RadMenuItem>
<rad:RadMenuItem Runat="server" Text="Products" AccessKey="P"></rad:RadMenuItem>
<rad:RadMenuItem Runat="server" Text="Support" AccessKey="S"></rad:RadMenuItem>
</Items>
</rad:RadMenu>

Keyboard navigation

Keyboard navigation is supported by using the [TAB] and arrow keys. Use the [TAB] key to focus the menu, and then use the arrow keys to move among menu items.

An alternative to arrow keys for moving forward and backward along the menu are the [TAB] and [SHIFT]+[TAB] key combinations:

  • To move forward, use the [TAB] key.
  • To move backward, use the [SHIFT]+[TAB] key combination.

Child menu items are expanded using the arrow keys from the opposite (perpendicular) axis: for example, in a horizontal menu, you navigate among the parent items with the left and right arrow keys (or with [TAB] / [SHIFT]+[TAB]); child items are accessed with the up and down arrow keys.

Use the [ESC] key to go back one level.

The following properties are related to keyboard accessibility as they define the flow and expanding direction of menu items:

  • Flow
    This property of RadMenu defines whether the menu is horizontal or vertical. Horizontal menus are navigated with the left and right arrow keys, while for vertical menus you use the up and down keys. Similarly, in a horizontal menu you expand the child items of the focused parent with the up and down keys, whereas in a vertical menu you use the left and right keys.
    The Flow property can also be set explicitly per item (see below, under GroupSettings).
  • ExpandDirection
    This property of the RadMenuItemGroupSettings class is applied for a specific item explicitly and defines how the collection of child items will be shown when expanded. The ExpandDirection property is exposed within a collection called GroupSettings (see below).
  • GroupSettings
    Apart from setting the Flow property on the menu level, you can explicitly set the flow and the expanding direction for each particular menu item. The RadMenuItemGroupSettings collection gives you access to the Flow and ExpandDirection properties. The values you set at this level affect the selected item's children.
    To access these properties for a menu item:

  1. In the Visual Studio design surface, right-click the instance of Telerik RadMenu, and then select Build RadMenu.
  2. Select the desired item, and click GroupSettings. The properties you set under GroupSettings (Pic. 1) will affect the children of the selected item.

Pic. 1

The GroupSettings collection

To learn more about the Flow and ExpandDirection properties, see Expand and Collapse Behavior.

See Also

Keyboard Support online example
Overview of Telerik RadMenu structure and appearance
Scrollable menu
Right-to-left support

© 2002-2008 Telerik. All Rights Reserved.


Expand and Collapse Behavior

Telerik RadMenu v4.4 Send comments on this topic.
Expand and Collapse Behavior
See Also
Feature overview > Expand and Collapse Behavior

Glossary Item Box

Setting the flow direction of the menu

The Flow property from the RadMenu class determines the behavior of Telerik RadMenu when child items are expanded or collapsed from their parent item. The property takes two values, Horizontal (default) and Vertical.

Pic. 1 below illustrates the default flow behavior of a horizontal menu:

Pic. 1

The default expanding direction of menu items

Below is the ASPX code of the menu in Pic. 1. The menu items highlighted in the picture are bold. The Flow property is not set, and therefore has accepted the default value.

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" Skin="Outlook">
<Items>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem1">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem1">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem11">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem111" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem12" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem2" />
<rad:RadMenuItem runat="server" Text="Child RadMenuItem3" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem2" />
<rad:RadMenuItem runat="server" Text="Root RadMenuItem3" />
</Items>
</rad:RadMenu>

Customizing the flow and expanding direction per item

The RadMenuItemGroupSettings class exposes the Flow and ExpandDirection properties. By setting these properties for a particular item, you define the flow and expanding direction of the item's children.

ExpandDirection has the following possible values:

  • Auto
    The expanding direction is inherited from the default behavior of the menu.
  • Up, Down, Left, Right
    The expanding direction changes in the specified direction. The values you set here do not propagate to subsequent hierarchical levels: that is, the selected item's children will expand in the new direction but their children will inherit the default behavior of the menu.
Flow and ExpandDirection are properties from the GroupSettings collection of RadMenuItem. To access GroupSettings:
  1. In the Visual Studio design surface, right-click the instance of Telerik RadMenu, and then select Build RadMenu.
  2. Select the desired item, and click GroupSettings. The properties you set under GroupSettings (Pic. 2) will affect the children of the selected item.

Pic. 2

The GroupSettings collection

Example

Pic. 3 shows a menu with the default flow and expanding behavior. The GroupSettings collection is used explicitly only for one of the levels, where the expanding direction takes a sharp turn. The example clearly illustrates that the change affects only the next level.

Pic. 3

Group settings are applied to one of the levels.

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" Skin="Outlook">
<Items>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem1">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem1" />
<rad:RadMenuItem runat="server" Text="Child RadMenuItem2" />
<rad:RadMenuItem runat="server" Text="Child RadMenuItem3">
<Items>
<radM :RadMenuItem runat="server" Text="Child RadMenuItem31">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem311">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem3111" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem312" />
</Items>
<GroupSettings ExpandDirection="Up" />
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem32" />
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem2" />
<rad:RadMenuItem runat="server" Text="Root RadMenuItem3" />
</Items>
</rad:RadMenu>

Setting Expand Effects

The following properties allow you to apply animated effects to the expanding and collapsing behavior of Telerik RadMenu:

  • ExpandAnimation / CollapseAnimation
    The properties from these groups specify the animation effect (if any) that accompanies the expanding or collapsing of child items.
    • Duration
      In milliseconds
    • Type
      A list of predefined animation effects to choose from
  • ExpandDelay / CollapseDelay
    These properties set the period of time (in milliseconds) between the mouse entering / leaving a menu item (or clicking the item - if ClickToOpen = "True") and the children starting to expand or collapse respectively.

See Also

Expand Direction online example
Expand Animation online example

© 2002-2008 Telerik. All Rights Reserved.


Offsetting groups of child items

Telerik RadMenu v4.4 Send comments on this topic.
Offsetting groups of child items
See Also
Feature overview > Offsetting groups of child items

Glossary Item Box

Normally, a group of child items expands adjacent to its parent item. You may want to change this setting for a particular group of items, so that the child items expand somewhere else on the page.

To allow this, the RadMenuItemGroupSettings class exposes the OffsetX and OffsetY properties. They indicate the horizontal and vertical offset of child menu items. The offset is measured in pixels. The value is relative to the parent item: the default value in both axes is 0 (no offset).

See Also

Offsetting the Groups online example
Overview of Telerik RadMenu structure and appearance
Expand and Collapse Behavior

© 2002-2008 Telerik. All Rights Reserved.


Right-to-left support

Telerik RadMenu v4.4 Send comments on this topic.
Right-to-left support
See Also
Feature overview > Right-to-left support

Glossary Item Box

Telerik RadMenu takes into account the direction attribute set to the control, or to any parent HTML element. If you set the direction of the body tag (or any other tag that contains Telerik RadMenu) to rtl, Telerik RadMenu reverses the order of its items, and aligns itself to the right side of the container.

Example

The menu below is with dir="rtl".

Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="Telerik" dir="rtl">
<Items>
<rad:RadMenuItem Text="First Item"></rad:RadMenuItem>
<rad:RadMenuItem Text="Second Item"></rad:RadMenuItem>
<rad:RadMenuItem Text="Third Item"></rad:RadMenuItem>
<rad:RadMenuItem Text="Fourth Item"></rad:RadMenuItem>
<rad:RadMenuItem Text="Fifth Item"></rad:RadMenuItem>
<rad:RadMenuItem Text="Sixth Item"></rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Right to Left online example

© 2002-2008 Telerik. All Rights Reserved.


Overlay

Telerik RadMenu v4.4 Send comments on this topic.
Overlay
See Also
Feature overview > Overlay

Glossary Item Box

Telerik RadMenu can now display menu groups over IE windowed objects, such as HTML select boxes, Flash movies, other 3rd party windows components. This is a built-in feature and it doesn't need to be set explicitly through a property.

See Also

Overlay

© 2002-2008 Telerik. All Rights Reserved.


Validation

Telerik RadMenu v4.4 Send comments on this topic.
Validation
See Also
Feature overview > Validation

Glossary Item Box

Telerik RadMenu can trigger the built-in ASP.NET validation controls.

To enable validation, make sure the CausesValidation property of the menu is set to true. (This is the default value.)

The ASP.NET 2.0 environment allows you to divide the validators on the page into groups. In case you want to activate only a certain group of validators, simply set the ValidationGroup property to the name of the desired group. If you leave this property blank, Telerik RadMenu will activate all validators on the page.

See Also

Overview of Telerik RadMenu structure and appearance
Validation groups

© 2002-2008 Telerik. All Rights Reserved.


Multi-row menu

Telerik RadMenu v4.4 Send comments on this topic.
Multi-row menu
See Also
Feature overview > Multi-row menu

Glossary Item Box

The simplest way to create a multi-row menu is by setting the area of the control to be narrower than the menu. The items will then be automatically distributed along as many rows as necessary. (The width of the menu is controlled by the Width property.)

Example

Pic. 1 and Pic. 2 below show the same menu: the difference is that in the first picture the Width property is not set and the menu takes as much space to render as necessary; the second menu is limited by the Width property.

Pic. 1

The items are rendered on one row; Width is not set.

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server">
<Items>
<rad:RadMenuItem runat="server" Text="About">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Products">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Services">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Partners">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Contact Us">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

Pic. 2

The items are rendered on two rows; Width is set.

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" Width="280px">
<Items>
<rad:RadMenuItem runat="server" Text="About">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Products">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Services">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Partners">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Contact Us">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>
To implement this functionality, the menu must be non-scrollable. (See Scrollable menu.)

See Also

Multirow online example
Overview of Telerik RadMenu structure and appearance
Layout (Vertical/Horizontal flow)
Hierarchical menu
Scrollable menu
Right-to-left support

© 2002-2008 Telerik. All Rights Reserved.


Layout (Vertical/Horizontal flow)

Telerik RadMenu v4.4 Send comments on this topic.
Layout (Vertical/Horizontal flow)
See Also
Feature overview > Layout (Vertical/Horizontal flow)

Glossary Item Box

Telerik RadMenu supports Horizontal (default) and Vertical layouts. The layout of the menu is controlled by the Flow property of the menu class.

If an item has child items, the Flow can be set for the child group trough the Flow property of the MenuItemGroupSettings class.

To illustrate the point, consider the following example:

Copy Code
<rad:RadMenu ID="RadMenu1" Skin="Outlook" Flow="Horizontal" runat="server">
<Items >
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="This">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
<GroupSettings Flow="Horizontal" />
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

The code above sets the flow for the root group and for a child group to Horizontal. The result is:

A vertical menu is rendered when the Flow property is set to Vertical.

Example

The example below shows a vertical menu as defined by the Flow property of RadMenu.

A vertical menu

ASPX Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Flow="Vertical">
<Items>
<rad:RadMenuItem runat="server" Text="Company"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Products">
<Items>
<rad:RadMenuItem runat="server" Text="Try"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Purchase"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Services"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Support"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Contact Us"></rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Item Flow online example
Overview of Telerik RadMenu structure and appearance
Right-to-left support

© 2002-2008 Telerik. All Rights Reserved.


Separators

Telerik RadMenu v4.4 Send comments on this topic.
Separators
See Also
Feature overview > Separators

Glossary Item Box

The menu layout can be further customized through separators. They are used for grouping the items into two or more categories. Sometimes, they are also used for achieving cosmetic effects.

You can set a given menu item as a separator using the IsSeparator property. You can then define its size using the Width property. The Text property value will still be rendered, but the item will not be clickable. If, however, the item has children, they will expand quite normally.

The screenshot below shows a menu where the "Purchase" and "Help" items are separated with an item separator.

The Quick Start item is a separator

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" Skin="Inox">
<Items>
<rad:RadMenuItem runat="server" Text="Configurator" Width="70px">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Purchase" Width="70px">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Quick Start" IsSeparator="True" Width="30px">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Help" Width="70px">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Examples" Width="70px">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Understanding the HTML output of Telerik RadMenu

© 2002-2008 Telerik. All Rights Reserved.


Hierarchical menu

Telerik RadMenu v4.4 Send comments on this topic.
Hierarchical menu
See Also
Feature overview > Hierarchical menu

Glossary Item Box

You can create a hierarchical menu in the following ways:

  • by defining the hierarchical structure inline;
  • programmatically, by using the server-side API;
  • by binding to a hierarchical data source control;
  • by binding to a non-hierarchical data source with a DataFieldID / DataFieldParentID relation.

Define the hierarchy inline

You do not need to set any property of the menu to make it hierarchical. Simply arrange the items hierarchically when defining the menu through the ASPX.

A menu control has an Items property that represents its items. You can add items to this collection; any item from this collection can also have its own Items collection. Thus you build the hierarchy of items rendered by the menu.

Example

The example below illustrates a hierarchical menu with up to three levels for some items. The picture shows all three levels. The active items in the picture are shown bold in the ASPX code.

A hierarchical menu

ASPX Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="Telerik">
<Items>
<rad:RadMenuItem runat="server" Text="Corporate" SelectedIndex="0">
<Items>
<rad:RadMenuItem runat="server" Text="About us">
<Items>
<rad:RadMenuItem runat="server" Text="News"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Team"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Careers"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Services">
<Items>
<rad:RadMenuItem runat="server" Text="Products"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Solutions"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Certifications"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Work">
<Items>
<rad:RadMenuItem runat="server" Text="Clients"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Testimonials"></rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="FAQ"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

Bind to a hierarchical data source

If bound to a hierarchical data source, the menu will appear multi-level. You do not need to set any additional properties.

To learn more, see SiteMapDataSource control.

Bind to a non-hierarchical data source with the DataFieldID/DataFieldParentID

See Hierarchical data binding and Data Bindings.

See Also

Hierarchical Data Binding
Overview of Telerik RadMenu structure and appearance
Multi-row menu

© 2002-2008 Telerik. All Rights Reserved.


Templates

Telerik RadMenu v4.4 Send comments on this topic.
Templates
See Also
Feature overview > Templates

Glossary Item Box

Telerik RadMenu has full design-time support for templates. For more information please view the chapter on Templates, sections on

ASPX structure of a menu template

How to add and edit templates Design Time

See Also

Templates
Overview of Telerik RadMenu structure and appearance

© 2002-2008 Telerik. All Rights Reserved.


Screen Boundaries Detection

Telerik RadMenu v4.4 Send comments on this topic.
Screen Boundaries Detection
Feature overview > Screen Boundaries Detection

Glossary Item Box

Screen Boundaries Detection - Telerik RadMenu groups can open in the opposite direction, if the window boundaries are to be crossed.

This feature can be disabled through the EnableScreenBoundaryDetection property:

Copy Code
<rad:RadMenu ID="RadMenu1" EnableScreenBoundaryDetection="false" Skin="Outlook" runat="server">

© 2002-2008 Telerik. All Rights Reserved.


Standards compliance

Telerik RadMenu v4.4 Send comments on this topic.
Standards compliance
Feature overview > Standards compliance

Glossary Item Box

Accessibility compliance

In conformance with the W3C Web Accessibility Guidelines 1.0,
Telerik RadMenu is "Level AAA" compliant.

Section 508

The USA federal mandate requires that information technology be made accessible to people with disabilities. Much of Section 508 compliance concerns making Web sites, intranets, and web-enabled applications accessible. Section 508 compliance has since become a major prerequisite not only in government related software, but also in most enterprise and corporate software solutions.

W3C Web Content Accessibility Guidelines 1.0

The main goal of these guidelines is to encourage developers in creating applications providing accessible contents. However, adhering to these guidelines will also make Web content more accessible to all kind of users, using different devices and interfaces: desktop browser, voice browser, mobile phone, automobile-based personal computer, etc.

In accordance with these guidelines W3C defines three levels of conformance developers may implement in order to provide some level of content compliance to their products:

  • Compliance Level "A"
  • Compliance Level "AA"
  • Compliance Level "AAA"

For more details on W3C "Web Content Accessibility Guidelines 1.0" see http://www.w3.org/TR/WAI-WEBCONTENT/.

In our attempt to make our products content compliant, each web-control we develop and its QSF strive to obtain at least one of the conformance levels listed above.

XHTML compliance

Telerik RadMenu now provides complete XHTML compliance:
the HTML markup of the component is fully XHTML 1.1 compliant.

XHTML

XHTML stands for EXtensible HyperText Markup Language: a stricter and cleaner version of HTML recommended by W3C (World Wide Web Consortium). XHTML is the effective inheritor of HTML 4.01. Although XHTML is almost identical to its predecessor, it is aimed to replace HTML.

© 2002-2008 Telerik. All Rights Reserved.


Getting Started

Telerik RadMenu v4.4 Send comments on this topic.
Getting Started

Glossary Item Box

This topic shows how to create a simple menu only in design-time.

Creating a simple menu

  1. Drag and drop a menu instance onto the page
  2. Build the menu through the Telerik RadMenu Builder
    1. Click the menu Smart Tag anchor
    2. Choose Build RadMenu
    3. Add menu items through the Telerik RadMenu Builder
    4. Press OK to confirm
  4. Apply Skin to the control using the Auto Format dialog box
    1. Choose Auto Format from the Smart Tag
    2. Select the desired Skin from the Auto Format dialog box
    3. The changed appearance will be reflected in design time right away

  6. Set the ClickToOpen property to true to make the child items open upon clicking a root item
    1. Right-click the menu instance and select Properties
    2. The Properties dialog will pop up
      1. Enable the ClickToOpen property

  8. The final result will be (an item should be clicked to open its children)

Binding Telerik RadMenu to an AccessDataSource

  1. Drag and drop an AccessDataSource control onto the page where the menu resides
  2. Configure the AccessDataSource through its Smart Tag
    1. Press the Smart Tag anchor and then Configure DataSource
    2. Browse the Access Data File and pressNext to confirm
    3. Specify the columns from a table and press Next to confirm
    4. Press Finish

  4. Choose the DataSource for Telerik RadMenu through the Telerik RadMenu Smart Tag
  5. In the Telerik RadMenu properties grid set the DataFieldId, DataFieldParentId and DataTextField
  6. The final result is looking like

© 2002-2008 Telerik. All Rights Reserved.


New to Telerik RadMenu?

Telerik RadMenu v4.4 Send comments on this topic.
New to Telerik RadMenu?

Glossary Item Box

Telerik RadMenu is an ASP .NET navigation control that features:

  • integrated server-side and client-side object models;
  • hierarchical menus;
  • dynamic menu creation;
  • Data Binding to various data sources:
    • ICollection, IEnumerable objects - arrays, ArrayLists, and so on;
    • ASP.NET 2.x Declarative DataSources:
      • Flat - AccessDataSource, SqlDataSource, ObjectDataSource;
      • Hierarchical:
        • AccessDataSource , SqlDataSource, ObjectDataSource;
        • XmlDataSource, SiteMapDataSource ;
  • support for ASP.NET postbacks, server-side events, form validation;
  • support for ASP.NET 2.0 cross-page postback and validation groups;
  • support for ASP.NET 2.0 Master Pages and Themes;
  • comprehensive cross-browser support;
  • support for Smart Tags , Templates , Auto Format and other Visual Studio design-time features.

For a more detailed list of features, see Key features.

To get a quick start by following a real application scenario, see:

  • Use DataBindings to create a hierarchical menu
  • Data Binding with Custom Attributes

© 2002-2008 Telerik. All Rights Reserved.


Key features

Telerik RadMenu v4.4 Send comments on this topic.
Key features
See Also
New to Telerik RadMenu? > Key features

Glossary Item Box

This topic outlines some important general features of Telerik RadMenu v 4.0.

Please note that Telerik RadMenu v4.0 is not backward compatible with previous versions.

Compatibility and Compliance Features

  1. Wide cross-browser support
    Telerik RadMenu supports all major browsers and platforms (both on PC and Mac, where applicable):
    • Internet Explorer 5.0+;
    • all Gecko-based browsers - Mozilla 1.0+, FireFox, Netscape 7+;
    • Opera 7.5x+.
    • Safari 1.2+
  2. Support for ASP.NET 2.0 and Visual Studio 2005
    Telerik RadMenu can run under both ASP.NET 1.x and ASP.NET 2.x. The control is compiled against both Visual Studio 2003 and 2005 (thus offering new specific features for Microsoft's next-generation IDE, Visual Studio .NET 2005).
  3. Standards compliance
    In conformance with the W3C Web Accessibility Guidelines 1.0, Telerik RadMenu is level AAA compliant. The default HTML output is fully XHTML 1.1 compliant.

Functionality

  1. Hierarchical structures
    You can easily build multilevel menus using nested XML tag declarations or databind the control to hierarchical data sources.

    A hierarchical menu
  2. Extensive keyboard support
    Telerik RadMenu delivers the convenience of desktop applications to the web with full support for:
    • shortcuts
    • access keys
    • arrow-key navigation
      Keyboard support
  4. Full design support
    Using intuitive dialogs, you can easily define menu structure and set the properties.
    The Builder dialog - a design-time feature
  5. You can achieve a wide variety of menu configurations by defining different property value combinations of Telerik RadMenu. These include:
    • Vertical menus
    • Multi-row menus
    • Scrollable menus
  6. Support for context menus
    Building context menus (activated with a right mouse click) is seamless with Telerik RadMenu. The item structure and appearance are defined in the same way as for the other types of menus.
  7. Flexible skinning mechanism
    The entire control look and feel is defined by skins. You can easily modify existing skins, or create your own.
  8. Automatic detection of screen boundaries
  9. Templates
    You can embed any content inside a Telerik RadMenu template, including HTML markup, ASP.NET server controls, and other third-party controls.
  10. Search engine and screen reader support
  11. Multi-language support

Rendering

  1. The semantic implementation of Telerik RadMenu uses a set of list items (rather than tables or DIVs) which dramatically trim the HTML output.

See Also

What's new

© 2002-2008 Telerik. All Rights Reserved.


Build a menu

Telerik RadMenu v4.4 Send comments on this topic.
Build a menu
See Also
New to Telerik RadMenu? > Design-time support > Build a menu

Glossary Item Box

Telerik RadMenu has a rich design-time support, allowing you to add/remove/edit items and see the changes reflected immediately.

To build a menu:

  1. Drag an instance of Telerik RadMenu from the toolbox onto the webform.
  2. Right-click the instance, and from the context menu, select the Build RadMenu command.

This will pop up RadMenu Builder, shown below.

The RadMenu Builder is divided into two panes. The treeview on the left outlines the current structure of the menu. The property grid on the right displays the properties of the currently selected menu item.

The Add root button adds a level 1 item. The Add child button adds a child item to the currently selected item in the tree view. The Remove button removes the selected item as well as all its child items.

Click OK to save your changes; click Cancel to discard them.

See Also

Apply skins in design time

© 2002-2008 Telerik. All Rights Reserved.


Apply skins in design time

Telerik RadMenu v4.4 Send comments on this topic.
Apply skins in design time
See Also
New to Telerik RadMenu? > Design-time support > Apply skins in design time

Glossary Item Box

Applying skins is fully supported in Visual Studio .NET design time.

To apply a skin to a menu in design time, set the Skin property.

You can preview the list of available skins in design mode. For more details, see The AutoFormat dialog box.

Predefined skins are located in ~/RadControls/Menu/Skins. To use them, you need to add the RadControls folder to the root of your web application.

To use your custom skin files, add the folder that contains them to ~/RadControls/Menu/Skins.

See Also

Skins
The AutoFormat dialog box

© 2002-2008 Telerik. All Rights Reserved.


The AutoFormat dialog box

Telerik RadMenu v4.4 Send comments on this topic.
The AutoFormat dialog box
See Also
New to Telerik RadMenu? > Design-time support > The AutoFormat dialog box

Glossary Item Box

Telerik RadMenu v4.0 offers support for the AutoFormat feature of .NET 2.0.

AutoFormat automatically detects the preset skins available with Telerik RadMenu (in ~/RadControls/Menu/Skins) and allows you to:

  • preview the skins (to preview the skins you should copy the RadControls folder to your application's root as it contains all the skin resources);
  • select and apply a skin.

See Also

Skins online example
Skins
Apply skins in design time

© 2002-2008 Telerik. All Rights Reserved.


Declarative data sources

Telerik RadMenu v4.4 Send comments on this topic.
Declarative data sources
See Also
New to Telerik RadMenu? > Design-time support > Declarative data sources

Glossary Item Box

You can to populate your instance of Telerik RadMenu with data from declarative data sources design time in Visual Studio 2005 .

When the data source is configured, the DataSourceID, DataTextField, DataNavigateUrlField, and DataValueField property drop-downs are automatically populated. You can select the ID of the newly configured data source from the DataSourceID drop-down. (The drop-down also allows you to generate a new data source.)

Design time support for declarative data sources

The same functionality is available through the Telerik RadMenu "Choose Data Source" Smart Tag:

data source from smart tag

See Also

Declarative Data Sources online example
Overview and types of data sources
Declarative data sources in ASP.NET 2.0
SiteMapDataSource
SqlDataSource or AccessDataSource

© 2002-2008 Telerik. All Rights Reserved.


Data Bindings

Telerik RadMenu v4.4 Send comments on this topic.
Data Bindings
See Also
New to Telerik RadMenu? > Design-time support > Data Bindings

Glossary Item Box

The DataBindings property of RadMenu is a collection that defines the relationship between a data item and the menu item it is binding to. In other words, the DataBindings collection allows you to specify both the criteria for binding and the property of a data item to bind to. The criteria indicate when a data item should be bound to a menu item. The criteria can be specified with depth, a data member, or both. (See Important notes about DataBindings properties below.)

DataBindings is fully controllable from the Visual Studio designer. Using the DataBindings design-time interface, you do not need to write any code when binding your menu.

ASPX structure of a menu with the DataBindings property set

In the ASPX page, the DataBindings collection resides within the <rad:RadMenu> and </rad:RadMenu> tags. For example:

Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" DataSourceID="AccessDataSource1"
DataFieldID="id" DataFieldParentID="parentId" DataTextField="Text">
<DataBindings>
<rad:MenuItemBinding EnabledField="" ImageUrl="" ImageUrlField="" NavigateUrl=""
NavigateUrlField="" Selectable="True" SelectableField="" Target="" TargetField=""
TextField="Text" ToolTip="" Value="" ValueField="" Depth="" ToolTipField="" />
</DataBindings>
</rad:RadMenu>

How to enable DataBindings

  1. Make sure all of the following properties of RadMenu are set accordingly:
    • DataSourceID - to the instance of the data source you want to bind the menu to;
    • DataTextField - to the data column you want to use for populating your items with text;
      The DataTextField property is optional. You can later set the TextField property of the DataBindings collection. (See below.)
    • If you are building a hierarchical menu, also set:
      • DataFieldID - to the column containing the IDs of data fields corresponding to each menu item;
      • DataFieldParentID - to the column containing the parent IDs of the data fields, if any.
  2. From the Telerik RadMenu Smart Tag, select Edit MenuItem DataBindings. The MenuItemBinding Collection Editor dialog appears.

    The MenuItemBinding Collection Editor dialog

  3. Under Members, click Add to add one or more members. Two or more members are required if you want to bind different properties at different depth levels. (See Depth below.)
  4. Set the properties for each member. When ready, click OK.

Important notes about DataBindings properties

Depth
Gets or sets the menu depth to which binding is applied. Accepts a numeric value. (The root level depth is "0".) If the property is not set, the current collection member settings affect all levels.

Text vs TextField, Value vs ValueField, etc.
All properties ending with the suffix -Field can be databound to take their values from a corresponding field in the data source. Properties not ending with -Field are static: all MenuItem objects to which the MenuItemBinding object is applied share the same value.

For instance, if your database contains a column named Text and you set TextField="Text", the Text property of all menu items will take its value from the Text column in the database. Alternatively, if you set Text="Text", all your menu items will take the static string "Text" as the value of their Text property.

DataMember
When the data source contains multiple elements or tables, use the DataMember property to specify the element or table to bind to a menu item. A data member specifies the type of the data item in the underlying data source, but can represent different information depending on the data source.

Sometimes you might need to create a menu item binding that specifies both a depth and a data member. This is often used when the data source contains items at different levels that have the same data member value. For example, you can have <Item> elements that appear at different levels within an XML file. The following MenuItemBinding declarations show how to specify menu item bindings that apply to identical data members at different menu depths:

Copy Code
<rad:MenuItemBinding DataMember="Item" Depth="1" TextField="Title">
<rad:MenuItemBinding DataMember="Item" Depth="2" TextField="ISBN">

If a menu item binding is defined without a depth and a data member, the menu item binding is applied to all menu items within the menu. This is commonly used when all data items have the same properties and should be displayed identically, regardless of the menu depth.

After the binding criteria are established, you can then bind a property of a MenuItem object that can be bound to a value. You can bind to a field of a data item or to a static value.

If multiple MenuItemBinding objects are defined that conflict with each other, Telerik RadMenu applies the menu item bindings in the following order of precedence:

  1. The MenuItemBinding object that defines both a depth and a data member.
  2. The MenuItemBinding object that defines only the depth.
  3. The MenuItemBinding object that defines only the data member.
  4. The MenuItemBinding object that defines neither the depth nor the data member.

For a step-by-step walkthrough of this functionality, see our example scenario.

See Also

Databindings online example
Overview and types of data sources

© 2002-2008 Telerik. All Rights Reserved.


Changes and backward compatibility

Telerik RadMenu v4.4 Send comments on this topic.
Changes and backward compatibility
See Also
Already using the control > Changes and backward compatibility > Changes and backward compatibility

Glossary Item Box

Telerik RadMenu v4.3.0

The current version features numerous bug fixes and performance optimizations.

Telerik RadMenu v4.0

Note that Telerik RadMenu v4.0 is not backward compatible with previous versions. The presented changes are due to numerous improvements and great enhancements in the current version.

API Changes

This section provides a list of all changes in various classes of the Telerik RadMenu control:

  • The MenuGroup class (obsolete)
  • Removed Classes
  • The RadMenu class
  • The MenuItem class
  • The MenuItemCollection class
  • Template-related changes
Atlas compatibility note
Atlas support may pose problems with the functionality of your web site, whether you are using Atlas or not. See Atlas support for more details.

Common skins

As of Q2 2006 we have introduced a variety of new common skins (themes in ASP.NET 2.0) for all Telerik RadControls for ASP.NET. By default all controls take a new polished look and feel which is consistent across the whole product line. Five other new common skins (Outlook, Mac, Inox, Telerik and WebBlue) have been added to all Telerik RadControls for ASP.NET for a richer set of interface designs to choose from.

Please, note that if you want to use the old default skins of any product you can still find them in RadControls/[ProductName]/Skins. A preview of all the provided skins is available in our Live Examples.

See Also

What's new
The RadMenu class
The RadMenuItem class
The obsolete MenuGroup class
Removed Classes
Template-related changes

© 2002-2008 Telerik. All Rights Reserved.


The RadMenu class

Telerik RadMenu v4.4 Send comments on this topic.
The RadMenu class
See Also
Already using the control > Changes and backward compatibility > The RadMenu class

Glossary Item Box

The following is a list of all changes in the RadMenu class from v3.7 to v4.0.

Telerik RadMenu v4.0 is not backward compatible with previous versions.

Client-side events

New events:

OnClientItemBlur

OnClientItemClicking

OnClientItemClose

OnClientItemFocus

OnClientItemOpen

OnClientLoad

OnClientMouseOut

Renamed events:

OnClientClick -> OnClientItemClicked

OnClientItemHighlight -> OnClientMouseOver

Removed Properties

RootGroup
There are no more groups in ra.d.menu. Now you can add new menu items through the Items property.

AutoPostBack
Even in case of just one event handler method associated with the menu, postback is automatically triggered.

CssFile
CssClass should be used instead

ContentFile
Telerik RadMenu v4.0 does not support this functionality. It is replaced by a simple XML definition. The XML file needed is in the format used in Telerik RadMenu v3.x. For more details, see XML definition.

CtrlKey, AltKey, ActivationKey
All of these properties have been replaced by a single property called AccessKey.

ImagesBaseDir

HRefBaseDir

KeyboardSupport
Keyboard support is ON by default and cannot be turned off.

Theme, ThemesDir

Scroll*
All properties starting with this prefix are now removed.

Opacity

MenuTemplates

Absolute*
All properties starting with this prefix are now removed.

Group*
All properties starting with this prefix are now removed.

Default*
All properties starting with this prefix are now removed.

BaseZIndex

Removed Methods

FindItemById

This is required because of the new way the ID property of RadMenuItem is generated. From this version on, the ID property of every menu item is auto-generated and because of this, its value may change on postback. So, there is no guarantee that an item will maintain its original ID value across postbacks.

New Properties

AppendDataBoundItems
Indicates whether the items are cleared before data binding.

CollapseAnimation
The animation played when the item is closed.

CollapseDelay
Delay in milliseconds between the mouse leaving the menu and the menu starting to collapse.

ExpandAnimation
The animation played when the item is opened.

ExpandDelay
Delay in milliseconds between the mouse entering a menu item and its child items starting to expand.

Items
The collection of items in the menu.

See Also

Changes and Backward Compatibility
Changes and backward compatibility
The RadMenuItem class
The obsolete MenuGroup class

© 2002-2008 Telerik. All Rights Reserved.


The RadMenuItem class

Telerik RadMenu v4.4 Send comments on this topic.
The RadMenuItem class
See Also
Already using the control > Changes and backward compatibility > The RadMenuItem class

Glossary Item Box

Item constructors

Some of the constructors from v2.x are now irrelevant and have been removed. Two new constructors have been added.

3.x:

  • public MenuItem()
  • public MenuItem(MenuGroup parentGroup,MenuItem parentItem,int itemLevel, RadMenu parentMenu)
  • public MenuItem(MenuGroup parentGroup,MenuItem parentItem,int itemLevel)
  • public MenuItem(MenuGroup parentGroup,MenuItem parentItem,MenuItem previousItem,MenuItem nextItem,int itemLevel)
  • public MenuItem(MenuGroup parentGroup,MenuItem parentItem,MenuItem previousItem,MenuItem nextItem,int itemLevel, RadMenu parentMenu)
  • public MenuItem(MenuGroup parentGroup)

4.0:

  • public MenuItem()
  • public MenuItem(string text)
  • public MenuItem(string text, string navigateUrl)

Renamed Properties

CssClassClicked -> ClickedCssClass

CssClassDisabled -> DisabledCssClass

CssClassOver -> FocusedCssClass

HRef -> NavigateUrl

Removed Properties

Appearance-related properties
All appearance-related properties can now be controlled via the CSS from the respective skin.

Image*
(ImageAlt, ImageClicked, ImageDisabled, ImageHeight, ImageLongDesc, ImageWidth)

AltKey

CtrlKey

Category

LeftLogo, LeftLogoClicked, LeftLogoDisabled, LeftLogoHeight, LeftLogoOver, LeftLogoWidth

RightLogo, RightLogoClicked, RightLogoDisabled, RightLogoHeight, RightLogoOver, RightLogoWidth

ParentGroup

Selected

OnClientClick

OnClientItemHighlight

OnClientItemSelect

StatusBarTip

LevelCss

Grouping-related properties
The grouping of items in v4.0 is achieved using a completely different approach. The whole MenuGroup class is now obsolete. This change is described in detail in The obsolete MenuGroup class. Below is just a simple example showing item grouping in v3 as opposed to v4:

Telerik RadMenu v3.x:

Copy Code
<rad:radmenu id="Menu1" runat="server">
<RootGroupPersistable>
<rad:MenuItem Text="New Item">
<ChildGroupPersistable>
<rad:MenuItem Text="New Item"></rad:MenuItem>
</ChildGroupPersistable>
</rad:MenuItem>
</RootGroupPersistable>
</rad:radmenu>

Telerik RadMenu v4.0:

Copy Code
<rad:RadMenu id="RadMenu3" runat="server">
<Items>
<rad:RadMenuItem ImageOverUrl="" Text="Root MenuItem">
<Items>
<rad:RadMenuItem ImageOverUrl="" Text="Child MenuItem"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Changes and backward compatibility
The RadMenu class
The obsolete MenuGroup class
Removed Classes
Template-related changes

© 2002-2008 Telerik. All Rights Reserved.


The obsolete MenuGroup class

Telerik RadMenu v4.4 Send comments on this topic.
The obsolete MenuGroup class
See Also
Already using the control > Changes and backward compatibility > The obsolete MenuGroup class

Glossary Item Box

The MenuGroup class has been removed for consistency with all Telerik navigational controls (treeview, tabstrip, combobox, etc.) and for API simplicity. Menu items now directly expose the Items collection, which may hold any number of child items.

Example

The ASPX code below shows a menu with two root items. The first root item has a child group consisting of three menu items:

Copy Code
<rad:RadMenu ID="RadMenu1" runat="server">
<Items>
<rad:MenuItem runat="server" Text="Root MenuItem 1">
<Items>
<rad:MenuItem runat="server”Text="Child MenuItem 1.1" />
<rad:MenuItem runat="server" Text="Child MenuItem 1.2" />
<rad:MenuItem runat="server" Text="Child MenuItem 1.3" />
</Items>
</rad:MenuItem>
<rad:MenuItem runat="server" Text="Root MenuItem 2" / >
</Items>
</rad:RadMenu>
Even though the MenuGroup class is gone, child items do form a group of related items that share common settings. These settings can be set in the GroupSettings class, exposed as a property of each MenuItem. (Pic. 1)

Pic. 1
The GroupSettings collection

Group settings defined using the Visual Studio design time are serialized declaratively as child tags of the respective parent MenuItem. Group settings apply to all children of the parent item.

Example

Copy Code
<rad:RadMenu ID="RadMenu1" runat="server">
<Items>
<rad:MenuItem runat="server" Text="Root MenuItem 1">
<GroupSettings Flow="Horizontal" Height="100px" OffsetX="200" OffsetY="100" />
<Items>
<rad:MenuItem runat="server”Text="Child MenuItem 1.1" />
<rad:MenuItem runat="server" Text="Child MenuItem 1.2" />
<rad:MenuItem runat="server" Text="Child MenuItem 1.3" />
</Items>
</rad:MenuItem>
<rad:MenuItem runat="server" Text="Root MenuItem 2" / >
</Items>
</rad:RadMenu>

See Also

Changes and backward compatibility
The RadMenu class
The RadMenuItem class
Removed Classes
Template-related changes

© 2002-2008 Telerik. All Rights Reserved.


Removed Classes

Telerik RadMenu v4.4 Send comments on this topic.
Removed Classes
See Also
Already using the control > Changes and backward compatibility > Removed Classes

Glossary Item Box

ItemEventArgs
This class is removed. All events now use the RadMenuEventArgs class.

MenuEntityInstantiatedEventArgs
This class is removed. All events now use the RadMenuEventArgs class.

MenuGroup
This class is removed. Items now are added through the Items property.
(For more details, see The obsolete MenuGroup class.)

See Also

Changes and backward compatibility
The RadMenu class
The RadMenuItem class
The obsolete MenuGroup class
Template-related changes

© 2002-2008 Telerik. All Rights Reserved.


Template-related changes

Telerik RadMenu v4.4 Send comments on this topic.
Template-related changes
See Also
Already using the control > Changes and backward compatibility > Template-related changes

Glossary Item Box

Defining an item template in Telerik RadMenu v3.x:
Copy Code
<rad:radmenu id="RadMenu1" runat="server">
<menutemplates>
<rad:menutemplate id="CalendarTemplate">
<content>
<asp:calendar id=Calendar1
firstdayofweek= "Monday"
font-name= "MS Sans Serif"
font-size= "8pt"
runat= "server">
</asp:calendar>
</content>
</rad:menutemplate>
</menutemplates>
</rad:radmenu>

<Menu>
<Group Flow="Horizontal" CssClass="MainGroup">
<Item Text="Templates Support">
<Group Width="100" OffsetY="3">
<Item TemplateID="CalendarTemplate" Text="Calendar" />
</Group>
</Item>
</Group>
</Menu>

Template definition in Telerik RadMenu v4.0:

Please, see Templates--> ASPX structure of menu templates

See Also

The RadMenu class

Changes and Backward Compatibility
Changes and backward compatibility
The RadMenuItem class
The obsolete MenuGroup class
Removed Classes

© 2002-2008 Telerik. All Rights Reserved.


Interoperability of Telerik RadMenu with RadAjax

Telerik RadMenu v4.4 Send comments on this topic.
Interoperability of Telerik RadMenu with RadAjax
AJAX support > Interoperability of Telerik RadMenu with RadAjax

Glossary Item Box

Remark: The built-in AJAX functionality in telerik RadGrid, RadCombobox, RadTeeview has a higher priority than telerik RadAjax. You should turn it off in order to update outside controls and use AJAX Panel or AJAX Manager.
Important note: telerik RadUpload is unable to upload files with an Ajax call. This is related to the inability of the XmlHttpRequest component to upload files. This component is the core of any Ajax framework, such as telerik RadAjax or Atlas (AJAX extensions for ASP.NET).

Telerik RadMenu is designed for seamless interoperability with the Telerik AJAX framework, the RadAjax suite enabling developers to implement the following functionality:

  • AJAXify (AJAX-enable) telerik RadMenu to work with AJAX instead of regular postbacks;
  • Update the telerik RadMenu control upon an AJAX request made by a control on the page via telerik RadAjax;
  • Make telerik RadMenu initiate an AJAX request in order to update other controls on the page.

Make telerik RadMenu work with AJAX requests (Ajax-enable Telerik RadMenu)

You can ajaxify any member of the telerik RadControls for ASP.NET suite. The ajax-enabled control will work in AJAX mode and will perform callback requests instead of regular postbacks.

To do so, you have two possible options:

  • place the instance of RadMenu into an AjaxPanel - in this case, the control will update itself and all other controls in the panel via AJAX request
  • place one AJAX Manager on the page and in its property builder set the AJAX pair, i.e. AJAX initiator and the updated control. In this case, as we want Telerik RadMenu to update itself with AJAX, it should be set as initiator and updated control.

Update telerik RadMenu upon AJAX request

Telerik RadMenu is fully compatible with the telerik RadAjax suite and can be updated via callbacks from any other control on the page without any additional coding. You have two possible options:

  • You need to have the AJAX Manager on the page and set the AJAX pair - AJAX initiator and the updated control (telerik RadMenu in this case). We recommend you do this using the visual editor in VS.NET.
  • Alternatively you can place telerik RadMenu in AJAX Panel together with the control that should update it.

Initiate an AJAX request and update other controls with Telerik RadMenu

You may want to initiate a callback request by telerik RadMenu and update other controls on the page.

To implement this functionality, you need to do the following:

  • Place AJAX Manager on the page. Open its property builder and set the AJAX pair. In this case Telerik RadMenu will be the AJAX initiator. You can set as many controls as you wish to be updated by a single request.

OR

  • Place both controls (telerik RadMenu and the control that should be updated) in AJAX Panel. telerik RadMenu will automatically start updating all controls in the panel (including itself) with AJAX requests.

More integration examples of telerik RadAjax with the other controls from the telerik RadControls for ASP.NET suite can be seen here.

© 2002-2008 Telerik. All Rights Reserved.


ASP.NET AJAX Framework

Telerik RadMenu v4.4 Send comments on this topic.
ASP.NET AJAX Framework
AJAX support > ASP.NET AJAX Framework

Glossary Item Box

Show All Show All
Hide All Hide All

All Telerik controls now provide full support for the new ASP.NET AJAX framework.
Telerik's own patent-pending AJAX mechanism does not interfere in any way with the ASP.NET AJAX framework. Telerik RadAjax, as well as all built-in AJAX features of Telerik RadControls for ASP.NET work with ASP.NET AJAX without any conflict.

To enable ASP.NET AJAX with Telerik RadMenu:

  1. Make sure you have the ASP.NET AJAX framework installed.
  2. If the control is initially invisible and is shown after an ASP.NET AJAX update, you should manually register all the required CSS files in the head tag of your page. Otherwise the control will not be displayed correctly. The easiest way to do this is through a LINK element:
    Copy Code
    <link href="~/RadControls/Menu/Skins/[SkinName]/styles.css" rel="stylesheet" runat="server" >
  3. Place the instance of Telerik RadMenu in an ASP.NET AJAX UpdatePanel.

To enable or disable the ASP.NET AJAX UpdatePanel, set the EnablePartialRendering property of the ScriptManager class to True or False accordingly.

Grid built-in AJAX has higher priority than external AJAX frameworks - ASP.NET AJAX and RadAjax. In case one need the Grid to be updated from an ASP:UpdatePanel, Grid's EnableAJAX should be turned off.

ASP.NET AJAX is not a Telerik product.
For further information about ASP.NET AJAX, refer to ASP.NET AJAX documentation .

Known problems related to ASP.NET AJAX interoperability

Exceptions

If you receive exceptions such as:

System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

you need to move the code block outside of the head tag. For example:

Before: Copy Code
<head runat="server">
<script>
var controlClientObject = <%= RadControl1.ClientID %>
...
</script>
</head>

<body>
...
</body>
After: Copy Code
<head runat="server">
</head>
<body>
<script>
var controlClientObject = <%= RadControl1.ClientID %>
...
</script>
...
</body>

© 2002-2008 Telerik. All Rights Reserved.


Overview and when to use templates

Telerik RadMenu v4.4 Send comments on this topic.
Overview and when to use templates
See Also
Templates > Overview and when to use templates

Glossary Item Box

Telerik RadMenu fully supports templates. You can embed any content inside a Telerik RadMenu template:

  • HTML markup
  • ASP.NET server controls
  • other third-party controls (other Telerik RadControls for ASP.NET as well)

When to use templates

Normally, Telerik RadMenu allows great flexibility with regard to the functionality and appearance of your menu items. However, templates are of great help if you want to embed complex elements (such as ASP .NET controls) inside your menu items.
For example, the only way to embed a standard ASP .NET Button control inside your menu items design-time is to add the control to the item template or at run-time to add

The example below shows a color picker embedded in a menu item template:

Example on when to use template

See Also

Templates online example
ASPX structure of a menu template
How to add and edit templates Design Time
DataBinding expressions

© 2002-2008 Telerik. All Rights Reserved.


ASPX structure of a menu template

Telerik RadMenu v4.4 Send comments on this topic.
ASPX structure of a menu template
See Also
Templates > ASPX structure of a menu template

Glossary Item Box

You can define two types of Telerik RadMenu templates:

  1. A global (RadMenu Item Template) template that is applied to all menu items automatically;
  2. A per item (Item Template) template which will override the global template if set.

See Also

Templates online example
How to add and edit templates Design Time
DataBinding expressions

© 2002-2008 Telerik. All Rights Reserved.


How to add and edit templates Design Time

Telerik RadMenu v4.4 Send comments on this topic.
How to add and edit templates Design Time
See Also
Templates > How to add and edit templates Design Time

Glossary Item Box

How to add and edit templates

To add and edit a global (RadMenu Item Template) template:

  1. Access the Item Template editor:
    • On the menu Smart Tag, click Edit Templates and choose RadMenu Item Template

    Set Global Template

    OR

    • Right-click the instance of Telerik RadMenu, and select Edit Template --> RadMenu Item Template.
  2. Add any content to the Item Template editor. For example, to add a third-party control, drag the desired control from the Toolbox.

To add and edit a per item (Item Template) menu template:

  1. Access the Item Template editor:
    • On the menu Smart Tag, click Edit Templates and choose an item

    Set Template per item

    • Or right-click the instance of Telerik RadMenu, and select Edit Template --> Item Template.
  2. Add any content to the Item Template editor. For example, to add a third-party control, drag the desired control from the Toolbox.

When you are done, just press End Template Editing:

End Template Editing

See Also

ASPX structure of a menu template
DataBinding expressions

© 2002-2008 Telerik. All Rights Reserved.


DataBinding expressions

Telerik RadMenu v4.4 Send comments on this topic.
DataBinding expressions
See Also
Templates > DataBinding expressions

Glossary Item Box

How to populate controls that are inside menu templates (Unbound Mode)

Consider the following scenario:

1. Suppose you have a simple menu and you build it with the designer like this:

Menu Structure in Designer

2. Add a global template with a button.

3. Add an item template for child 1.1 with a label (for more information view the topic on How to add and edit templates Design Time).

If you run the application at this point the Telerik RadMenu will display the items with the templated controls' settings:

However, you can override the templated controls properties using

<%# DataBinder.Eval(Container, "Item's Property Field") %>.

For example, let's say we want to override the Text property of the templated controls with the Text Property of the menu items:

Copy Code
<rad:RadMenu ID="RadMenu2" runat="server">
<Items>
<rad:RadMenuItem runat="server" Text="root 1">
<Items>
<rad:RadMenuItem runat="server" Text="child 1.1">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>'/>
</ItemTemplate>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="root 2">
</rad:RadMenuItem>
</Items>
<ItemTemplate>
<asp:Button ID="Button2" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>'/>
</ItemTemplate>
</rad:RadMenu>

The effect of the above code will be:

How to populate controls that are inside menu templates (DataBound Mode)

When you are binding the menu to a Data Source, the only thing that is different from the unbound mode is

the DataItem extension of the Container: <%# DataBinder.Eval(Container.DataItem, "Text") %>

For example:

Copy Code
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/menu1.mdb"SelectCommand="SELECT * FROM [Table1]" />
<rad:RadMenu ID="RadMenu1" runat="server" DataFieldID="ID" DataFieldParentID="ParentID"
DataSourceID="AccessDataSource1">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Text") %>' />
</ItemTemplate>
</rad:RadMenu>

Using the following datasource:

Access Data Table

See Also

How to add and edit templates Design Time
ASPX structure of a menu template

© 2002-2008 Telerik. All Rights Reserved.


How to add templates (controls) runtime

Telerik RadMenu v4.4 Send comments on this topic.
How to add templates (controls) runtime
Templates > How to add templates (controls) runtime

Glossary Item Box

Now adding controls to a menu item is really simple and easy. You no longer need to define a class that implements the ITemplate interface and the other cumbersome coding normally associated with this scenario. Simply use the Add method of the Controls collection of the menu item which will hold the control. Here is an example:

C# Copy Code
Button btnExport = new Button();
btnExport.Text = "Export";
RadPanelBar1.Items[0].Items[0].Controls.Add(btnExport);

VB.NET Copy Code
Dim btnExport As New Button()
btnExport.Text = "Export"
RadPanelBar1.Items(0).Items(0).Controls.Add(btnExport)

© 2002-2008 Telerik. All Rights Reserved.


For a page or a specific element

Telerik RadMenu v4.4 Send comments on this topic.
For a page or a specific element
See Also
Context Menu > For a page or a specific element

Glossary Item Box

For a page

Telerik RadMenu exposes the IsContext property. When IsContext is set to true the Telerik RadMenu will appear when the user right-clicks anywhere on the page.

For a specific element

A context menu can be set to appear only when the user right-clicks on a specific element. To achieve this you need to set both

IsContext and ContextMenuElementID. For example:

Copy Code
<img id="contextElement" src="images/640x480.gif" alt="" style="float:left" />

<rad:RadMenu id="RadMenu1"runat="server" IsContext="True" ContextMenuElementID="contextElement">
<Items>
<rad:RadMenuItem Text="Trees" Value="images/Trees640x480.jpg" />
<rad:RadMenuItem Text="Sunset" Value="images/Sunset640x480.jpg" />
<rad:RadMenuItem Text="Mountains" Value="images/Mountains640x480.jpg" />
</Items>
</rad:RadMenu>

The above code will trigger a context menu when the image with ID = "contextElement" is right-clicked

See Also

Context Menu online example
Popup Menu online example

© 2002-2008 Telerik. All Rights Reserved.


Integration with treeview and grid

Telerik RadMenu v4.4 Send comments on this topic.
Integration with treeview and grid
See Also
Context Menu > Integration with treeview and grid

Glossary Item Box

Integration with Telerik RadTreeView

To implement a Telerik RadTreeView with context Telerik RadMenu we will use java script, the Show() method of the Telerik RadMenu, and the BeforeClientContextMenu event of the Telerik RadTreeView. Here is an example:

The menu Copy Code
<rad:RadMenu
ID="RadMenu1"
runat="server"
IsContext="True"
ContextMenuElementID="none">
<Items>
<rad:RadMenuItem Text="Add Child Node"/>
<rad:RadMenuItem Text="Delete" />
</Items>
</rad:RadMenu>

It is important to set ContextMenuElementID to a non-existing ID. Otherwise the context menu will appear on right-clicking anywhere on the page

The java script function ShowContextMenu utilizing the Show() method

Copy Code
<script type="text/javascript">

function ShowContextMenu(node, eventArgs)
{
var contextMenu = <%= RadMenu1.ClientID %>; ;
contextMenu.Show(eventArgs);

//suppresses the default context menu of the browser:
eventArgs.returnValue = false;
if (eventArgs.preventDefault)
{
eventArgs.preventDefault();
}
}
</script>
The treeview calling the ShowContextMenu function on BeforeClientContextMenu event
Copy Code
<radT:RadTreeView
ID="RadTree1"
Runat="server"
ContentFile="tree.xml"
BeforeClientContextMenu="ShowContextMenu"
</radT:RadTreeView>

Integration with Telerik RadGrid

Please, see the online help on context menu with Telerik RadGrid

See Also

Rich Context Menu (treeview) online example
Context Menu (grid) online example

© 2002-2008 Telerik. All Rights Reserved.


Popup menu

Telerik RadMenu v4.4 Send comments on this topic.
Popup menu
See Also
Context Menu > Popup menu

Glossary Item Box

Showing context menu on mouseover or mouseclick

This functionality can be achieved with java script function which uses the Telerik RadMenu Show() method:

Copy Code
<img src="Images/landscape.jpg" onmouseover="ShowMenu(event)" alt="" />
<img src="Images/landscape.jpg" onclick="ShowMenu(event)" alt="" />

<rad:RadMenu id="RadMenu1"
runat="server"
Skin="Outlook"
IsContext="True"
ContextMenuElementID="None">
<Items>
<rad:RadMenuItem Text="Trees" />
<rad:RadMenuItem Text="Sunset" />
<rad:RadMenuItem Text="Mountains" />
</Items>

<script type="text/javascript">
function ShowMenu(e)
{
var menu = <%= RadMenu1.ClientID %>;
menu.Show(e);
e.cancelBubble = true; //prevents IE from closing the menu
if (e.stopPropagation)
{
e.stopPropagation(); //prevents Firefox/Modzilla/Opera from closing the menu
}
}
</script>

It is important to prevent the browser from closing the menu as shown above.

Showing the context menu at a specified position on the screen

The ShowAt(x,y) method allows you to control the positioning of the context menu. For example:

Copy Code
<input type="button" class="button" onclick="ShowMenuAt(event,100,100)" value="show at" />

<script type="text/javascript">

function ShowMenuAt(e, x, y)
{
var menu = <%= RadMenu1.ClientID %>;
if (isNaN(x) || isNaN(y))
{
alert("Enter valid integer coordinates");
return;
}
menu.ShowAt(x, y);
e.cancelBubble = true;
if (e.stopPropagation)
{
e.stopPropagation();
}
}
</script>

See Also

Context Menu online example
Popup Menu online example

© 2002-2008 Telerik. All Rights Reserved.


Overview

Telerik RadMenu v4.4 Send comments on this topic.
Overview
See Also
Custom Attributes > Overview

Glossary Item Box

It is not always possible to provide all properties that might be needed for certain type of scenarios. That is why menu items(RadMenuItem) provide a special collection called Attributes. You can store any number of attributes in the collection as name/value pairs.

You can set or access custom attributes in one of the following ways:

ASPX/ASCX file

    Copy Code
<rad:RadMenuItem State="unchecked" Text="Bold"></rad:RadMenuItem>

Code-behind

You can also set custom attributes from code behind via the Attributes collection exposed by the RadMenuItem class.

C# Copy Code
RadMenuItem item = new RadMenuItem();
item.Attributes["State"] = "unchecked";
VB.NET Copy Code
Dim item As RadMenuItem = New RadMenuItem()
item.Attributes("State") = "unchecked"

Client-side

To set the value of a custom attribute on the client-side you should use the SetAttribute method.

    Copy Code
<script type="text/javascript">
function ToggleCheck (sender, args)
{
var item = args.Item;
item.SetAttribute("State", "checked");
}
</script>

To get the value of a custom attribute on the client-side you should use the GetAttribute method.

    Copy Code
<script type="text/javascript">
function ToggleCheck (sender, args)
{
var item = args.Item;
var state = item.GetAttribute("State");
}
</script>

See Also

Custom Attributes online example

Example Scenarios
Databinding with Custom Attributes

© 2002-2008 Telerik. All Rights Reserved.


Overview

Telerik RadMenu v4.4 Send comments on this topic.
Overview
See Also
ASP.NET 2.0 features > Overview

Glossary Item Box

This version of Telerik RadMenu is complied against the .NET 2.0 framework and offers features specific for Microsoft's Visual Studio .NET 2005. The .NET 2.0 framework enables developers to enjoy significant productivity gains, while delivering feature-rich, standards-compliant, AJAX-enabled, and cross-browser compatible web applications.

Please note that Telerik RadMenu v4.0 is not backward compatible with previous versions.

Feature Highlights

  • More powerful VS.NET design-time support
    The design-time functionality of r.a.d.menu has been enhanced to support the new version of Visual Studio .NET 2005 along with new productivity features such as Smart Tags.
  • Smart Tags
    r.a.d.menu takes advantage of Smart Tags, the VisualStudio 2005 feature that provides quick access to commonly used control properties.
  • Support for .NET 2.0 ThemesThe themes and skins featured in ASP.NET 2.0 allow for easy customization of the control's appearance. You can define style information in a common location called "Theme", and apply that style information globally to pages or controls on your site. Just like Master Pages, Themes improve the maintenance of your applications and eliminate the unnecessary duplication of code for shared styles.
  • Declarative data source support
  • Master Pages
  • Validation Groups
  • Cross-page postback

Product Versions

With the release of Telerik RadControls for ASP.NET for .NET 2.0, Telerik has been maintaining two separate versions: one for .NET 1.x and one for .NET 2.0. The two versions are identical in terms of features except where mandated by the platform.

Updates

To use the .NET2 version of Telerik RadMenu, make sure you apply the DLL that includes the NET2 abbreviation (i.e. Radmenu.Net2.dll).

See Also

Smart Tags
Support for .NET 2.0 Themes

© 2002-2008 Telerik. All Rights Reserved.


Smart Tags

Telerik RadMenu v4.4 Send comments on this topic.
Smart Tags
ASP.NET 2.0 features > Smart Tags

Glossary Item Box

r.a.d.menu takes full advantage of the Smart Tags introduced in Visual Studio 2005.

Using the Smart Tag Panel

When an instance of Telerik RadMenu is selected on the Web Form's design surface, a Smart Tag anchor is displayed in its top-right corner.

Pic. 1 below shows the Smart Tag panel for an instance of Telerik RadMenu.

With Smart Tags, you can:

  • customize the visual appearance of the control (Auto Format);
  • select a data source control to bind to (Choose Data Source);
  • visually create or edit the structure of the control (Build RadMenu);
  • define the content of each menu item (Edit Templates).

Pic. 1

© 2002-2008 Telerik. All Rights Reserved.


Cross-page postback

Telerik RadMenu v4.4 Send comments on this topic.
Cross-page postback
See Also
ASP.NET 2.0 features > Cross-page postback

Glossary Item Box

ASP.NET 2.0 introduces the ability to have an ASPX page postback to a different ASPX page with cross page postbacks. This can be achieved by setting the PostBackUrl property to the page that will handle the postback. Once in the second page, you can access the controls from the previous page by accessing the Page.PreviousPage property.

Copy Code
<rad:RadMenu
ID="RadMenu1"
runat="server"
Skin="Outlook"
PostBackUrl="CrossPageCS.aspx"
>

See Also

Cross Page Postback online example
ASP.NET 2.0 overview
Validation groups

© 2002-2008 Telerik. All Rights Reserved.


Validation groups

Telerik RadMenu v4.4 Send comments on this topic.
Validation groups
See Also
ASP.NET 2.0 features > Validation groups

Glossary Item Box

You can assign a group name to a set of validators to ensure that validation occurs only for controls in the specified group. This enables you to have multiple separately validated forms on a single page.

The ValidationGroup property is used when you want to perform separate validation scenarios on the same page. Set the group name on validator controls and on the button that causes validation. By default, all validators are in the "" group (default group), for backward compatibility. The Page object also exposes the GetValidators("group") method and the Validate("group") method. Page.IsValid reflects validity of all controls (cumulative) that have had Validate called.

Copy Code
<rad:RadMenu
ID="RadMenu1"
runat="server"
SelectedIndex="0"
Skin="Telerik"
ValidationGroup="MenuValidationGroup"
CausesValidation="True"
>

...

Copy Code
<asp:TextBox runat="server" ID="name">
</asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" ControlToValidate="name"
Display="Dynamic" ErrorMessage="Please, enter the name to search for" ValidationGroup="MenuValidationGroup" />

See Also

ASP .NET 2.0 overview
Smart Tags
Cross-page postback
Validation Groups online example

© 2002-2008 Telerik. All Rights Reserved.


Declarative data sources in ASP.NET 2.0

Telerik RadMenu v4.4 Send comments on this topic.
Declarative data sources in ASP.NET 2.0
See Also
ASP.NET 2.0 features > Declarative data source support > Declarative data sources in ASP.NET 2.0

Glossary Item Box

The ASP.NET 2.0 platform provides an entirely new approach to data binding. This approach eliminates the coding necessary for connecting a control to its underlying data source. Telerik r.a.d.menu employs this new way of accessing data, so that its data binding can be accomplished in a completely declarative manner using the new data source controls.

Declarative data source controls expose data from a back-end store (SQL database, middle-tier business object, XML file, XML Web Service) to a data-bound UI control on a page. Data source controls also provide new capabilities such as sorting, paging, caching, updating, inserting, and deleting data. UI controls can automatically use these features without any additional code.

Data Source Controls

Data source controls are not rendered, but instead represent a particular back-end data store. ASP.NET 2.0 includes the following server controls out-of-the-box: SqlDataSource, ObjectDataSource, AccessDataSource, SiteMapSource, XmlDataSource.

Currently Telerik RadMenu supports the following data source controls:

  • SqlDataSource
    The SqlDataSource control enables you to use a Web control to access data located in a relational data base, including Microsoft SQL Server and Oracle databases, as well as OLE DB and ODBC data sources.
  • ObjectDataSource
    The ObjectDataSource is an ASP.NET data source control that represents a data-aware middle-tier object or a data-interface object to data-bound controls. You can use the ObjectDataSource control in conjunction with a data-bound control to display, edit, and sort data on a Web page with little or no code.
  • AccessDataSource
    The AccessDataSource control is works with Microsoft Access databases. Like its base class, SqlDataSource, the AccessDataSource control uses SQL queries to perform data retrieval. To learn how to bind a menu to an AccessDataSource control, refer to the AccessDataSource topic of this manual.
  • SiteMapSource - enables binding to the hierarchy exposed by an ASP.NET 2.0 site navigation provider.
    The SiteMapDataSource control is associated to a data-bound control through the control's DataSourceID property. For general information on site navigation in ASP.NET, refer to the SiteMaps topic of this manual.
  • XmlDataSource - enables binding to an XML file or document.
    XmlDataSource supports a DataFile property for specifying the path to an XML data file to be used as input. You may also specify a TranformFile property to apply an XSLT transformation to the data and an XPath property for specifying a subset of nodes to expose from the data source.

Choosing the DataSource control

To enable data binding, you can use the property grid in Visual Studio 2005, as shown in the screenshot below:

The DataSourceID property

See Also

Declarative Data Sources online example
SiteMapDataSource
SqlDataSource or AccessDataSource

© 2002-2008 Telerik. All Rights Reserved.


SiteMapDataSource

Telerik RadMenu v4.4 Send comments on this topic.
SiteMapDataSource
See Also
ASP.NET 2.0 features > Declarative data source support > SiteMapDataSource

Glossary Item Box

When data-bound to a SiteMapDataSource control, Telerik RadMenu automatically creates menu item hierarchy and maps the title, url, and description fields of the sitemap to the Text, NavigateUrl, and ToolTip properties respectively.

The SiteMapDataSource control allows you to define the structure of your site and bind any navigational control to it. You can have only one sitemap per site. By default the SiteMapDataSource control will use the default Site Navigation Provider. This provider allows you to define the structure of your site, separating the real page structure of the site on one hand, and the UI presentation on the other.
The default site navigation provider is XML-based. It should stay in the root level of your project and should be named web.sitemap. Using the Site Navigation API provided in ASP.NET v2.0, you can write your own Site Navigation Provider and expose the navigation information from any back-end system, if needed.

Setting the SiteMapDataSource control

Before you add the SiteMapDataSource control to your page, you need to add the Site Navigation Provider.

Use the solution explorer and the [Add New Item...] command. In the templates dialog, select Site Map, as shown below:

The SiteMap control configuration

When the web.sitemap file is created, Visual Studio generates the default initial code.

Copy Code
<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="" title="" description="" />
<siteMapNode url="" title="" description="" />
</siteMapNode>
</siteMap>

Now you can go ahead and populate the Web.sitemap file. Here is an example:

Copy Code
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="http://www.telerik.com" title="Telerik" description="Telerik home page">
<siteMapNode url="http://www.telerik.com/radcontrols" title="Telerik RadControls for ASP.NET" description="Telerik RadControls for ASP.NET" >
<siteMapNode url="http://www.telerik.com/radeditor" title="Telerik RadEditor" description="Telerik RadEditor control"/>
</siteMapNode>
<siteMapNode url="http://www.telerik.com/radnavigation" title="Telerik RadNavigation controls" description="Telerik RadNavigation controls" />
</siteMapNode>
</siteMap>
Note, that the url must be unique for each node.

To create a SiteMapDataSource instance, from the Toolbox, under Data, drag an instance of SiteMapDataSource to the design surface.

Binding the SiteMapDataSource to Telerik RadMenu

From the property grid of the menu, set the DataSourceID to the ID of the SiteMapDataSource control.

Each siteMapNode has three attributes which are mapped automatically to the respective properties:

  • url - Maps to the NavigateUrl property. The path can be either relative (using the ~/), or absolute.
    Avoid using backslashes ('\') for your URLs. Backslashes may cause problems with some browsers. Instead, we recommend using the slash character ('/').
  • title - Maps to the Text property.
  • description - Maps to the ToolTip property.

To set additional properties or overwrite already populated fields you can use the ItemDataBound event. The example below overwrites the TooTip property with the Text value of the item and sets the Value property to a concatenated string of [Text] + "_Value".

C# Copy Code
protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
{
e.Item.ToolTip = (string)DataBinder.Eval(e.Item.DataItem, "title");
e.Item.Value = (string)DataBinder.Eval(e.Item.DataItem, "title") + "_Value";
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemDataBound(sender As Object, e As Telerik.WebControls.RadMenuEventArgs)
e.Item.ToolTip = CStr(DataBinder.Eval(e.Item.DataItem, "title"))
e.Item.Value = CStr(DataBinder.Eval(e.Item.DataItem, "title")) + "_Value"
End Sub

You can view the code library project on databinding for a working demo application.

See Also

Code library project on databinding Telerik RadNavigational controls
Declarative Data Sources online example
SqlDataSource or AccessDataSource
XmlDataSource

© 2002-2008 Telerik. All Rights Reserved.


SqlDataSource or AccessDataSource

Telerik RadMenu v4.4 Send comments on this topic.
SqlDataSource or AccessDataSource
See Also
ASP.NET 2.0 features > Declarative data source support > SqlDataSource or AccessDataSource

Glossary Item Box

The SqlDataSource and AccessDataSource controls are very similar to each other with respect to binding to Telerik RadMenu. In this topic we show an example with the AccessDataSourceControl. The same approach is applicable to SqlDataSource.

The AccessDataSource control enables you to retrieve data from a Microsoft Access database (.mdb file). You can then use it to populate Telerik RadMenu.

To bind your menu to an instance of an AccessDataSource:

  1. Drag a new menu onto your web form.
  2. Right-click and select Show Smart Tag.
  3. Open the Choose Data Source drop-down and select New Data Source.
    New data source
  4. From the Data Source Configuration Wizard dialog box, select Access database.

    The Data Source Configuration Wizard dialog box
  5. Browse to the location of your MDB file.
    For the purpose of this demonstration we use the "menudata.mdb" file delivered with the Telerik RadMenu quick start framework. It contains a table called "Links" with the following data:
    Access data
  6. Select the "id", "Text" and "parentId" from the Configure the select statement dialog box. This specifies the columns that will be retrieved from the "Links" table.
    The Select Statement dialog box
  7. Click Finish to close the wizard.
  8. Open the Properties grid for your menu.
  9. Click the DataTextField drop-down and select Text. This will specify the column that the Text property of all menu items will be bound to.
    Mapping the DataTextField property
  10. Save your page and run it in the browser. Here is the result:
    The bound data on the menu

If you forget to set the "DataTextField" property your menu will look like this:

Text field without data

Build a hierarchical menu

To build a hierarchical menu, you need to set the DataFieldID and DataFieldParentID properties. Considering the "Links" table above, you should set the DataFieldID to "id" and the DataFieldID to "parentId" as follows:

  • DataFieldID:

  • DataFieldParentID:

Now your menu should look like this:

You can view the code library project on Data Binding for a working demo application.

See Also

Declarative Data Sources online example
Code library project on Data Binding
XmlDataSource
SiteMapDataSource

© 2002-2008 Telerik. All Rights Reserved.


Support for .NET 2.0 Themes

Telerik RadMenu v4.4 Send comments on this topic.
Support for .NET 2.0 Themes
See Also
ASP.NET 2.0 features > Support for .NET 2.0 Themes

Glossary Item Box

Among the numerous innovations of the .NET 2.0 Framework are the so-called Themes. They enable the separation of a control's look from its functionality. As a result, developers will be able to completely change the look of a control in an easy declarative manner. This improves the maintainability of your applications and eliminates the unnecessary duplication of code for shared styles.

Each Theme is a folder with one .skin file and any additional resources (such as .CSS files, images, etc). The skin file contains XML tags that are used to configure the controls on the page.

The fastest way to get started with your own custom skin is by modifying an existing skin. From http://www.telerik.com/skins, you can download all resources necessary to deploy or modify selected skins for the Telerik components. Each skin archive contains the images, CSS, and ASPX declaration needed to apply a skin in your project, as well as the original Adobe Photoshop PSD source file you will need to modify the design. For more instructions, please refer to the Readme file in the skin archive.

Assigning a Theme to a Page

An individual page can be assigned a Theme by setting the <%@ Page Theme="..." %> directive to the name of a global or application-level. A page can only have one Theme applied, but there may be multiple skin files in the theme that apply style settings to controls in the page.

You can also define the applied theme for all pages in an application by specifying the <pages theme="..."/> section in Web.config. To unset this theme for a particular page, you can set the Theme attribute of the Page directive to empty string ("").

Using Themes local to the application

Local Themes reside in the App_Themes folder directly under the application root directory. A Theme consists of a named subdirectory which may contain CSS file and/or subdirectories for static files like images. Each theme should have one or more skin files, with the .skin extension. The content of a skin file are simply definitions of the properties of the controls, used to specify how the controls will appear and behave on the page. A skin file can contain multiple control definitions, for example one definition for each control type.

Skins can be organized in a variety of ways inside a Theme's skin files. Since a Theme can contain multiple skin files, you might divide up named skins into separate files, where each skin file contained multiple control definitions with the same SkinID.

The example below shows two ways how skin files are arranged in the Theme folder.

Three skin files in a Theme each named according to a particular SkinID value

Skin files grouped by control type, where each skin contains a set of skin definitions for a particular control

Copy Code
/MySite1
/App_Themes
/MyThemes
Default.skin
Yellow.skin
Green.skin
Copy Code
/MySite1
/App_Themes
/MyThemes
radgrid.skin
radpanelbar.skin
RadTabStrip.skin
You can define different styles for controls of the same type in a skin file by creating separate definitions of the control. You can set a separate SkinID property on these control definitions to a name of your choosing, and then set this same SkinID value on controls in pages that should have this specific skin applied. In the absence of a SkinID property, the default skin (one without a SkinID property set) applies.

The source code below is an example of the definitions for a skin file for Telerik RadGrid and Telerik RadTreeView.

Copy Code
<%@ Register TagPrefix="radP" Namespace="Telerik.WebControls" Assembly="RadPanelebar.Net2" %>
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadMenu.Net2" %>

<radG:RadPanelbar
runat="server"
Skin="Mac"
.../>

<radT:RadMenu
runat="server"
Skin="WebBlue"
.../>
The properties of controls defined in the theme automatically override the local property value for a control of the same type in the target page with the Theme applied.

Example: How to create and use a theme from an already existing skin?

From version 4.0 on, Telerik RadMenu is distributed without predefined Themes. This is to avoid redundancy since you can easily create a Theme from one of the already existing skins which come with the control.

This example shows how to create a theme to control the appearance of multiple instances of various controls in a single page. In particular, we will apply the Mac skin to a Telerik RadMenu and a Telerik RadPanelBar and the Telerik skin to another set of instances of the same type. We will differentiate among the skins using the SkinID property.

Goal

Eventually, we will create a web page that will look like this: Themes

Steps to reproduce

1. Create a new Theme folder. For this example we will call it "MyTheme".

From the solution explorer, right-click on the root of the project --> Add ASP.NET Folder --> Theme.

Add a theme folder

2. Add a skin file to the theme folder.

Right-click on the "MyTheme" folder you created in step 1 --> Add new item --> Skin file.

3. Populate the skin file.

The skin file should have the following content:

Copy Code
<%@ Register Assembly="RadPanelbar.Net2" Namespace="Telerik.WebControls" TagPrefix="radP" %>
<%@ Register Assembly="RadMenu.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<radp:radpanelbar
runat="server"
Skin="Mac"
SkinID="MacForPanelbar"
/>

<rad:RadMenu
runat="server"
Skin="Mac"
SkinID="MacForMenu"
/>

<radp:radpanelbar
runat="server"
Skin="Telerik"
SkinID="TelerikForPanelbar"
/>

<rad:RadMenu
runat="server"
Skin="Telerik"
SkinID="TelerikForMenu"
/>
This is provided that you have copied the RadControls folder for Telerik RadMenu and Telerik RadPanelBar in the root of your application. Otherwise, you will need to explicitly specify the paths to the skins' css files and images.

4. Set the theme in the page directive.

Copy Code
<%@ Page ... Theme="MyTheme" ... %>

5. Set the Skin ="None" and specify the SkinID.

Copy Code
<radP:RadPanelbar ID="RadPanelbar1" runat="server" Skin="None" SkinID="MacForPanelbar" >
...

<radP:RadPanelbar ID="RadPanelbar2" runat="server" Skin="None" SkinID="TelerikForPanelbar">
...

<rad:RadMenu ID="RadMenu1" runat="server" Skin="None" SkinID="MacForMenu">
...

<rad:RadMenu ID="RadMenu2" runat="server" Skin="None" SkinID="TelerikForMenu">
...

See Also

Themes online example
Overview
Smart Tags

© 2002-2008 Telerik. All Rights Reserved.


Define the structure inline

Telerik RadMenu v4.4 Send comments on this topic.
Define the structure inline
See Also
Defining the Telerik RadMenu structure > Define the structure inline

Glossary Item Box

Telerik RadMenu provides a convenient mechanism that allows you to define the structure of a menu inline, directly in the ASPX/ASCX file. To do this you need to enclose every MenuItem definition within the <rad:RadMenu> and </rad:RadMenu> tags.

The inline definition of the menu shown by the screenshot above looks like this:

Copy Code
<rad:RadMenu
ID="RadMenu1"
Skin="Inox"
Runat="server" DataTextField="">
<Items>
<rad:RadMenuItem Text="Examples" runat="server"/>
<rad:RadMenuItem Text="Configurator" runat="server"/>
<rad:RadMenuItem Text="Quick Start" runat="server"/>
<rad:RadMenuItem Text="Help" runat="server"/>
<rad:RadMenuItem Text="Purchase" runat="server"/>
</Items>
</rad:RadMenu>

You can use the Visual Studio designer and the Build RadMenu command to define your menu structure.

See Also

Define the structure programmatically
XML definition
Add items dynamically

© 2002-2008 Telerik. All Rights Reserved.


Define the structure programmatically

Telerik RadMenu v4.4 Send comments on this topic.
Define the structure programmatically
See Also
Defining the Telerik RadMenu structure > Define the structure programmatically

Glossary Item Box

Using the server-side API, you can programmatically add, remove, and edit items in Telerik RadMenu.

Below is the code used to programmatically build a menu with three items:

C# Copy Code
protected Telerik.WebControls.RadMenu RadMenu1;

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadMenuItem item1 = new RadMenuItem();
item1.Text = "Item 1";
RadMenuItem item2 = new RadMenuItem();
item2.Text = "Item 2";
RadMenuItem item3 = new RadMenuItem();
item3.Text = "Go to the Telerik site";
item3.NavigateUrl = "http://www.telerik.com";
RadMenu1.Items.Add(item1);
RadMenu1.Items.Add(item2);
RadMenu1.Items.Add(item3);
}
}
VB.NET Copy Code
Dim RadMenu1 As Telerik.WebControls.RadMenu

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not Page.IsPostBack Then
Dim item1 As RadMenuItem = New RadMenuItem
item1.Text = "Item 1"
Dim item2 As RadMenuItem = New RadMenuItem
item2.Text = "Item 2"
Dim item3 As RadMenuItem = New RadMenuItem
item3.Text = "Go to the Telerik site"
item3.NavigateUrl = "http://www.telerik.com"
RadMenu1.Items.Add(item1)
RadMenu1.Items.Add(item2)
RadMenu1.Items.Add(item3)
End If
End Sub

See Also

Define the structure inline
Add, remove and disable menu items
XML definition
Add items dynamically

© 2002-2008 Telerik. All Rights Reserved.


XML definition

Telerik RadMenu v4.4 Send comments on this topic.
XML definition
See Also
Defining the Telerik RadMenu structure > XML definition

Glossary Item Box

Telerik RadMenu can still be built from an XML content file provided that the XML file is in an earlier menu version format.

The way the Telerik RadMenu processes the XML file is the following:

1. It reads the file and tries to map the XML node attributes to the existing RadMenuItem properties.

2. If there isn't RadMenuItem property wit such a name, then the Telerik RadMenu searches the following table for any corresponding property names:

CssClassClicked -> ClickedCssClass
CssClassDisabled" -> DisabledCssClass
Href -> NavigateUrl
Image -> ImageUrl
ImageOver -> ImageOverUrl
Key -> AccessKey
LeftLogo, RightLogo -> ImageUrl
LeftLogoOver -> ImageOverUrl

3. If the RadMenuItem property with a name equal to the XML node attribute is still not found, then the node attribute goes into the custom attributes collection.

The LoadContentFile or LoadXmlString method should be used to populate the menu with data.

If you need to save the structure of a panelbar as an XML string, use the GetXmlString method. The way the GetXmlString method works is the following:

1. the GetXmlString method gets all of the public properties of the RadPanelbar object and enumerates through all of them.

2. If the current property is in the list of excluded properties (These are properties which are not serialized. For example, Parent is such a property.) the process jumps to the next item.

3. If the current value of the property that is being checked is different from the default value of that property, then this property will be serialized, and the new XML node attribute will be created for that property.

4. After all of the RadPanelbar properties have been serialized, the GetXmlString method serializes all of the child items using the same algorithm

Example:

menu defined through XML

XML Copy Code
< Menu>
<Group Flow="Horizontal">
<Item Text="File">
<Group OffsetX="-2" OffsetY="2">
<Item Text="New" />
<Item Text="Open">
<Group Width="140" Flow="Vertical">
<Item Text="Project" PostBack="True" />
<Item Text="Project From Web" />
<Item Text="File" />
<Item Text="File from Web" />
</Group>
</Item>
<Item Text="Close" />
<Item Text="Add New Item" />
<Item Text="Add Existing Item" />
<Item Text="Add Project" />
</Group>
</Item>
<Item Text="Edit" >
<Group Flow="Vertical" OffsetY="2">
<Item Text="Undo" />
<Item Text="Redo" />
<Item Image="break.gif" />
<Item Text="Cut" />
<Item Text="Copy" />
<Item Text="Paste" />
</Group>
</Item>
<Item Text="View" >
<Group Flow="Vertical" OffsetY="2">
<Item Text="Open" />
<Item Text="Open With" />
<Item Text="Toolbox" />
<Item Text="Resource View" />
<Item Image="break.gif" ImageWidth="140" />
<Item Text="Properties" />
</Group>
</Item>
<Item Text="Help" >
<Group Flow="Vertical" OffsetX="-26" OffsetY="2">
<Item Text="Index" />
<Item Text="Search" />
<Item Text="Online" />
<Item Image="break.gif" />
<Item Text="About us" />
</Group>
</Item>
</Group>
</Menu>
Please, note that the XML is case sensitive.
C# Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadMenu1.LoadContentFile( "~/Menu/menu.xml");
}
}
VB.NET Copy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
RadMenu1.LoadContentFile( "~/Menu/menu.xml")
End If
End Sub

See Also

Xml Definition online example
Define the structure inline
Define the structure programmatically
Add items dynamically

© 2002-2008 Telerik. All Rights Reserved.


Add items dynamically

Telerik RadMenu v4.4 Send comments on this topic.
Add items dynamically
See Also
Defining the Telerik RadMenu structure > Add items dynamically

Glossary Item Box

You can dynamically add items to an instance of Telerik RadMenu, using the server-side API.

The RadMenu class exposes an Items collection; menu items added to this collection are the root (first-level) items of the menu. The MenuItem class also exposes an Items collection; items added to the Items collection of a particular MenuItem are its child items.

Example

The code below shows how you can add items to the menu in Pic. 1 by clicking the existing items. The two ititial items act as buttons.

Pic. 1

Adding items at runtime

ASPX Copy Code
<rad:RadMenu ID="RadMenu1" runat="server" OnItemClick="RadMenu1_ItemClick">
<Items>
<rad:RadMenuItem Text="Add Root Item At Runtime" runat="server">
</rad:RadMenuItem>
<rad:RadMenuItem Text="Add Child Item At Runtime" runat="server">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>
C# Copy Code
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
{
string text1 = e.Item.Text;
switch (text1)
{
case "Add Root Item At Runtime":
RadMenuItem RootItem = new RadMenuItem();
RootItem.Text = "New Root Item";
RadMenu1.Items.Add(RootItem);
//adds a new item to the root group
break;
case "Add Child Item At Runtime":
RadMenuItem ChildItem = new RadMenuItem();
RadMenuItem ParentItem = e.Item;
ChildItem.Text = "New Child Item";
ParentItem.Items.Add(ChildItem);
break;
}
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs)
Handles RadMenu1.ItemClick
Dim text1 As String = e.Item.Text
Select Case text1
Case "Add Root Item At Runtime"
Dim RootItem As New RadMenuItem()
RootItem.Text = "New Root Item"
RadMenu1.Items.Add(RootItem)
'adds a new item to the root group
Case "Add Child Item At Runtime"
Dim ChildItem As New RadMenuItem()
Dim ParentItem As RadMenuItem = e.Item
ChildItem.Text = "New Child Item"
ParentItem.Items.Add(ChildItem)
'adds a child item to the clicked item
End Select
End Sub

See Also

Define the structure inline
Define the structure programmatically
XML definition

© 2002-2008 Telerik. All Rights Reserved.


Overview and types of data sources

Telerik RadMenu v4.4 Send comments on this topic.
Overview and types of data sources
See Also
Data Binding > Overview and types of data sources

Glossary Item Box

Overview

Data Binding is achieved by setting the DataSource property and calling the DataBind() method. If you are using declarative data sources such as AccessDataSource or SiteMapDataSource, databinding is achieved by specifying the DataSourceID.

You can get a working demo application on Data Binding from our code library here.

Usually, you would also want to do one or some of the following:

  1. Set Text, Value or NavigateUrl properties using:
    1. DataTextField - Gets or sets the field of the data source that provides the Text of the menu items.
    2. DataNavigateUrlField - Gets or sets the field of the data source that provides the NavigateUrl of the menu items.
    3. DataValueField - Gets or sets the field of the data source that provides the Value of the menu items
  2. Set other properties

    Properties other than the above three (Text, Value and NavigateUrl) can be set in the ItemDataBound event:
    C# Copy Code
    protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
    {
    e.Item.ToolTip =    "Read more about " + (string)DataBinder.Eval(e.Item.DataItem, "Text");
    }
    VB.NET Copy Code
    Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs)
    e.Item.ToolTip = "Read more about " + CStr(DataBinder.Eval(e.Item.DataItem, "Text"))
    End Sub
  3. Establish hierarchy through ID to ParentID relationship using:
    1. DataFieldID - The name of the DataColumn holding the ID value.
    2. DataFieldParentID - The name of the DataColumn holding the ParentID value. The id of the root items should be null.

With respect to binding to Telerik RadMenu, data sources can be divided into two major categories:

1. Data Sources from which Telerik RadMenu can create menu item hierarchy

  • DataTable, DataSet, DataView
  • SiteMapDataSource
  • XmlDataSource
  • SqlDataSource
  • AccessDataSource

When the menu is bound to such data sources it can have not only root items, but also child items:

root 1 root 2

-child 2.1

-child 2.2 -child 2.2.1

-child 2.2.2

  1. Data Sources from which Telerik RadMenu will automatically create menu item hierarchy:
    • XmlDataSource
    • SiteMapDataSource
  2. Data Sources which require the ID to ParentID relationship to establish hierarchy:
    • DataTable, DataSet, DataView
    • SqlDataSource
    • AccessDataSource
The ID to ParentID relationship is established by setting the DataFieldID and DataFieldParentID properties

2. Data Sources from which Telerik RadMenu cannot create menu item hierarchy

  • Any class that implements the IEnumerable interface: ArrayList, Array, String, etc.
  • ObjectDataSource

When the menu is bound to such Data Sources it is flat, i.g. it has only root items

root 1 root 2 root 3

Setting DataFieldID and DataFieldParentID will have no effect.

See Also

Code library project on Data Binding
Hierarchical Data Binding online example

© 2002-2008 Telerik. All Rights Reserved.


DataTable, DataSet or DataView

Telerik RadMenu v4.4 Send comments on this topic.
DataTable, DataSet or DataView
See Also
Data Binding > DataTable, DataSet or DataView

Glossary Item Box

Telerik RadMenu can be bound to DataTable, DataSet and DataView. Hierarchy can be established with ID->ParentID relation.

The following example illustrates all the key points when binding to DataTable, DataSet or DataView.

We will use a dynamically created DataTable as the data source.

C# Copy Code
private DataTable CreateTestTable()
{
DataTable table = new DataTable();

table.Columns.Add("ID");
table.Columns.Add("ParentID");
table.Columns.Add("Text");
table.Columns.Add("URL");
table.Columns.Add("Tooltip");

table.Rows.Add(new string[] { "1", null, "root 1", "root1.aspx", "root 1 tooltip" });
table.Rows.Add(new string[] { "2", null, "root 2", "root2.aspx", "root 1 tooltip" });
table.Rows.Add(new string[] { "3", "1", "child 1.1", "child11.aspx", "child 1.1 tooltip" });
table.Rows.Add(new string[] { "4", "1", "child 1.2", "child12.aspx", "child 1.2 tooltip" });
table.Rows.Add(new string[] { "5", "1", "child 1.3", "child13.aspx", "child 1.3 tooltip" });
table.Rows.Add(new string[] { "6", "5", "child 1.3.1", "child131.aspx", "child 1.3.1 tooltip" });
table.Rows.Add(new string[] { "7", "5", "child 1.3.2", "child132.aspx", "child 1.3.2 tooltip" });
table.Rows.Add(new string[] { "8", "5", "child 1.3.3", "child133.aspx", "child 1.3.3 tooltip" });

return table;
}
VB.NET Copy Code
Private Function CreateTestTable() As DataTable
Dim table As New DataTable()

table.Columns.Add("ID")
table.Columns.Add("ParentID")
table.Columns.Add("Text")
table.Columns.Add("URL")
table.Columns.Add("Tooltip")

table.Rows.Add(New String() {"1", Nothing, "root 1", "root1.aspx", "root 1 tooltip"})
table.Rows.Add(New String() {"2", Nothing, "root 2", "root2.aspx", "root 1 tooltip"})
table.Rows.Add(New String() {"3", "1", "child 1.1", "child11.aspx", "child 1.1 tooltip"})
table.Rows.Add(New String() {"4", "1", "child 1.2", "child12.aspx", "child 1.2 tooltip"})
table.Rows.Add(New String() {"5", "1", "child 1.3", "child13.aspx", "child 1.3 tooltip"})
table.Rows.Add(New String() {"6", "5", "child 1.3.1", "child131.aspx", "child 1.3.1 tooltip"})
table.Rows.Add(New String() {"7", "5", "child 1.3.2", "child132.aspx", "child 1.3.2 tooltip"})
table.Rows.Add(New String() {"8", "5", "child 1.3.3", "child133.aspx", "child 1.3.3 tooltip"})

Return table
End Function

The ParentID of the root items must be null (nothing). If for some reason the data source comes without null values for the ParentID column, the solution is to create a query that returns the expected value (null). For example:

SELECT ID, Text, IF(ParentID = 0, NULL, ParentID) FROM tblData

The above code shows how to convert ParentID= 0 to ParentID=null
Another approach is to load the data source into a data table and modify the ParentID values of the table.

Bind the control, establish hierarchy and set the Text, Value and NavigateUrl properties:

C# Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RadMenu1.DataSource = CreateTestTable();

//Establish hierarchy:
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";

//Set Text, Value, and NavigateUrl:
RadMenu1.DataTextField = "Text";
RadMenu1.DataValueField = "ID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataBind();
}
}
VB.NET Copy Code
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Not IsPostBack Then
RadMenu1.DataSource = CreateTestTable()

'Establish hierarchy:
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"

'Set Text, Value, and NavigateUrl:
RadMenu1.DataTextField = "Text"
RadMenu1.DataValueField = "ID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataBind()
End If
End Sub

To set additional properties subscribe to the ItemDataBound event and use the following method:

C# Copy Code
protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
{
//Set additional properties. ToolTip for example:
DataRowView row = (DataRowView)e.Item.DataItem;
e.Item.ToolTip = row["Tooltip"].ToString();
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemDataBound(sender As Object, e As Telerik.WebControls.RadMenuEventArgs)
'Set additional properties. ToolTip for example:
Dim row As DataRowView = CType(e.Item.DataItem, DataRowView)
e.Item.ToolTip = row("Tooltip").ToString()
End Sub 'RadMenu1_ItemDataBound

See Also

Code library project on Data Binding
Access database and OleDbDataAdapter
SQL database and SqlDataAdapter

© 2002-2008 Telerik. All Rights Reserved.


Access database and OleDbDataAdapter

Telerik RadMenu v4.4 Send comments on this topic.
Access database and OleDbDataAdapter
See Also
Data Binding > Access database and OleDbDataAdapter

Glossary Item Box

Knowing how to databind to DataTable, DataSet or DataView, we can use this knowledge and bind Telerik RadMenu to a table from an Access database.

C# Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Table1",
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
+ Server.MapPath("~/App_Data/db1.mdb"));

DataSet links = new DataSet();
adapter.Fill(links);

RadMenu1.DataSource = links;
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataTextField = "Text";
RadMenu1.DataNavigateUrlField = "URL";
RadMenu1.DataBind();
}
}
VB.NET Copy Code
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Not Page.IsPostBack Then
Dim adapter As New OleDbDataAdapter("SELECT * FROM Table1", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
+ Server.MapPath("~/App_Data/db1.mdb"))

Dim links As New DataSet()
adapter.Fill(links)

RadMenu1.DataSource = links
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataTextField = "Text"
RadMenu1.DataNavigateUrlField = "URL"
RadMenu1.DataBind()
End If
End Sub 'Page_Load

See Also

Code library project on Data Binding
SQL database and SqlDataAdapter
DataTable, DataSet or DataView

© 2002-2008 Telerik. All Rights Reserved.


SQL database and SqlDataAdapter

Telerik RadMenu v4.4 Send comments on this topic.
SQL database and SqlDataAdapter
See Also
Data Binding > SQL database and SqlDataAdapter

Glossary Item Box

The idea behind this topic is similar to the Access database and OleDbDataAdapter and DataTable, DataSet or DataView topics. We create a DataSet from a table in an SQL database and bind it to Telerik RadMenu.

C# Copy Code
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
SqlDataAdapter adapter = new SqlDataAdapter("Select * from Table1", @"Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;
Connect Timeout=30;User Instance=True");

DataSet links = new DataSet();
adapter.Fill(links);

RadMenu1.DataSource = links;
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataTextField = "Text";
RadMenu1.DataNavigateUrlField = "URL";
RadMenu1.DataBind();
}
}
VB.NET Copy Code
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Not Page.IsPostBack Then
Dim adapter As New SqlDataAdapter("Select * from Table1", "Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|Database.mdf;
Integrated Security=True;
Connect Timeout=30;User Instance=True")

Dim links As New DataSet()
adapter.Fill(links)

RadMenu1.DataSource = links
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataTextField = "Text"
RadMenu1.DataNavigateUrlField = "URL"
RadMenu1.DataBind()
End If
End Sub 'Page_Load

See Also

Code library project on Data Binding
DataTable, DataSet or DataView
Access database and OleDbDataAdapter

© 2002-2008 Telerik. All Rights Reserved.


XmlDataSource

Telerik RadMenu v4.4 Send comments on this topic.
XmlDataSource
See Also
Data Binding > XmlDataSource

Glossary Item Box

When Telerik RadMenu is bound to an XmlDataSource, it will create menu item hierarchy automatically. However, unlike SiteMapDataSource, properties such as Text and NavigateUrl will not be automatically populated.

Please, consider the following example:

  1. Add the following xml file in the App_Data folder:
    XML Copy Code
    <?xml version="1.0" encoding="utf-8" ?>
    <    Items Text="">
    <Item Text="European cities" Url="" >
    <Item Text="Sofia" Url="http://en.wikipedia.org/wiki/Sofia" />
    <Item Text="Berlin" Url="http://en.wikipedia.org/wiki/Berlin" />
    <Item Text="Paris" Url="http://en.wikipedia.org/wiki/Paris" />
    </Item>
    <Item Text="North American cities" Url="">
    <Item Text="Boston" Url="http://en.wikipedia.org/wiki/Boston" />
    <Item Text="San Francisco" Url="http://en.wikipedia.org/wiki/San_Francisco" />
    <Item Text="Seattle" Url="http://en.wikipedia.org/wiki/Seattle" />
    <Item Text="Toronto" Url="http://en.wikipedia.org/wiki/Toronto" />
    </Item>
    <Item Text="South American cities" Url="">
    <Item Text="Rio de Janeiro" Url="http://en.wikipedia.org/wiki/Rio_De_Janeiro" />
    <Item Text="Buenos Aires" Url="http://en.wikipedia.org/wiki/Buenos_aires" />
    </Item>
    <Item Text="Asian cities" Url="">
    <Item Text="Tokyo" Url="http://en.wikipedia.org/wiki/Tokyo" />
    <Item Text="Seul" Url="http://en.wikipedia.org/wiki/Seul" />
    <Item Text="Beijing" Url="http://en.wikipedia.org/wiki/Beijing" />
    <Item Text="Tehran" Url="http://en.wikipedia.org/wiki/Teheran" />
    </Item>
    <Item Text="African cities" Url="">
    <Item Text="Kano" Url="http://en.wikipedia.org/wiki/Kano" />
    <Item Text="Johannesburg" Url="http://en.wikipedia.org/wiki/Johannesburg" />
    <Item Text="BeninCity" Url="http://en.wikipedia.org/wiki/Benin" />
    </Item>
    </    Items>
  2. Drag an instance of the XmlDataSource in the web form and configure the control:
  3. Set the DataSourceID of Telerik RadMenu to the ID of the XmlDataSource or choose data source from the smart tag:

    Choose Data Source
  4. To map the Text, Value and NavigateUrl fields you can set the following properties to the corresponding attributes in the XML file:

    Copy Code
    DataTextField = "Text"
    DataNavigateUrlField= "Url"
    DataValueField= "Value"

    The xml file for this particular example does not have a Value field, so you cannot actually populate the Value property of the items.
  5. To map additional properties or overwrite already populated properties, you can subscribe to the ItemDataBound event and use the following method:

    C# Copy Code
    protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
    {
    if (e.Item.Level > 0)//set tooltip only for child items
    {
    XmlElement element = (XmlElement)e.Item.DataItem;
    e.Item.ToolTip =     "Read more about " + element.Attributes["Text"].Value;
    }
    }

    VB Copy Code
    Protected Sub RadMenu1_ItemDataBound(sender As Object, e As Telerik.WebControls.RadMenuEventArgs)
    If e.Item.Level > 0 Then 'set tooltip only for child items
    Dim element As XmlElement = DirectCast(e.Item.DataItem, XmlElement)
    e.Item.ToolTip = "Read more about " + element.Attributes("Text").Value
    End If
    End Sub

See Also

Code library project on Data Binding
Declarative Data Sources online example
SiteMapDataSource
SqlDataSource or AccessDataSource

© 2002-2008 Telerik. All Rights Reserved.


ObjectDataSource

Telerik RadMenu v4.4 Send comments on this topic.
ObjectDataSource
See Also
Data Binding > ObjectDataSource

Glossary Item Box

When data-bound to ObjectDataSource, Telerik RadMenu cannot create menu item hierarchy.

Example

ASPX Copy Code
<rad:RadMenu
ID="RadMenu1"
runat="server"
DataSourceID="ObjectDataSource1">
</rad:RadMenu>
<asp:ObjectDataSource
ID="ObjectDataSource1"
Runat="server"
TypeName="NodesArray"
SelectMethod="GetNodes"/>
NodesArray.CS Copy Code
using System;
using System.Collections;
using System.Data;
using System.IO;

public class NodesArray
{
public NodesArray() {}

public static ArrayList GetNodes()
{
ArrayList nodesList = new ArrayList();
nodesList.Add("One");
nodesList.Add("Two");
nodesList.Add("Three");

return nodesList;
}
}
NodesArray.VB Copy Code
Imports System
Imports System.Collections
Imports System.Data
Imports System.IO

Public Class NodesArray

Public Sub New()
End Sub 'New

Public Shared Function GetNodes() As ArrayList
Dim nodesList As New ArrayList()
nodesList.Add("One")
nodesList.Add("Two")
nodesList.Add("Three")

Return nodesList
End Function 'GetNodes
End Class 'NodesArray

See Also

ArrayList
Code library project on Data Binding

© 2002-2008 Telerik. All Rights Reserved.


ArrayList

Telerik RadMenu v4.4 Send comments on this topic.
ArrayList
See Also
Data Binding > ArrayList

Glossary Item Box

Binding Telerik RadMenu to a data source of type which implements IEnumerable such as Array or ArrayList is flat databinding because only root items are created and there is no hierarchy.

Here is a general outline of such databinding:

  1. Create the collection.
  2. Add string values to the collection and set the DataSource property of Telerik RadMenu to the instance of the collection.
  3. Call the DataBind() method.

The text from the collection is then automatically mapped to the Text property of the respective menu item.

If you have a collection (ArrayList, array or in fact any collection implementing ICollection or IEnumerable) that contains objects (as opposed to string values), you can take advantage of the DataTextField, DataNavigateUrlField, and the DataValueField properties to map a property from the object directly to the Text, NavigateUrl or Value fields.

If you need to map additional properties from the object to other properties of the respective menu item, you have to subscribe to the ItemDataBound event. The event arguments passed to the event, e.Item and e.Item.DataItem, hold the instance of the menu item being bound and the DataItem associated with the menu item. You can then map a property from the DataItem (make sure to cast the DataItem object to your respective data type first) to the property of the RadMenuItem class.

Example:

C# Copy Code
private ArrayList GenerateArrayList()
{
ArrayList itemsList = new ArrayList();
itemsList.Add("One");
itemsList.Add("Two");
itemsList.Add("Three");

return itemsList;
}

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
RadMenu1.DataSource = GenerateArrayList();
RadMenu1.DataBind();
}
}
VB.NET Copy Code
Private Function GenerateArrayList() As ArrayList
Dim itemsList As New ArrayList()
itemsList.Add("One")
itemsList.Add("Two")
itemsList.Add("Three")
Return itemsList
End Function 'GenerateArrayList

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then

RadMenu1.DataSource = GenerateArrayList()
RadMenu1.DataBind()

End If
End Sub

See Also

Overview and types of data sources
Code library project on Data Binding
ObjectDataSource

© 2002-2008 Telerik. All Rights Reserved.


Append databound items

Telerik RadMenu v4.4 Send comments on this topic.
Append databound items
See Also
Data Binding > Append databound items

Glossary Item Box

RadMenu exposes the AppendDataBoundItems property (False by default). If you data-bind the menu using the DataBind() method, all menu items are automatically cleared.

Setting AppendDataBoundItems to True will preserve items that are already present in the menu and you can databind RadMenu to multiple data sources or using both unbound and bound modes.

See Also

Overview and types of data sources
Code library project on Data Binding

© 2002-2008 Telerik. All Rights Reserved.


Skins

Telerik RadMenu v4.4 Send comments on this topic.
Skins
See Also
Controlling the visual appearance > Skins

Glossary Item Box

Unlike previous versions, the visual appearance of Telerik RadMenu v4.0 is completely controlled with skins. (See Changes and Backward Compatibility for a detailed list of changes.)

To select a skin, set the Skin property of the RadMenu class.

Telerik RadMenu is installed with a number of preset skins. You can tweak the existing skins, or create your own.

Predefined skins are located in ~/RadControls/Menu/Skins.

Creating custom skins

The fastest way to get started with your own custom skin is by modifying an existing skin. From http://www.telerik.com/skins, you can download all resources necessary to deploy or modify selected skins for the Telerik components. Each skin archive contains the images and the CSS file needed to apply a skin in your project, as well as the original Adobe Photoshop PSD source file you will need to modify the design. For more instructions, please refer to the Readme file in the skin archive.

Organization of skin files and folders

The default location of the Telerik RadMenu skins is RadCotrols/Menu/Skins. Each skin folder contains:

  • Img/ - the sub-folder where the skin images are stored;
  • styles.css - the stylesheet of the skin.

Naming conventions

Upon creating a new skin, have in mind that the folder where the new skin is stored is named after the skin itself. Also, within the Styles.css document, to all classes should be appended a suffix with an underscore and the name of the new skin. For example:

Copy Code
.RadMenu_MyCustomSkinName
{
font: bold 10px Verdana, Arial, Arial, Sans-serif;
}

See Also

Understanding the HTML output of Telerik RadMenu
Change the menu images
Change the look of item states
Change the look of hovered items
Apply skins in design time

© 2002-2008 Telerik. All Rights Reserved.


Introduction and contents

Telerik RadMenu v4.4 Send comments on this topic.
Introduction and contents
See Also
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Introduction and contents

Glossary Item Box

Introduction

This tutorial is aimed at web-developers that have intermediate / advanced knowledge of Cascading Style Sheets – css selectors, pseudo-elements, floats, block-level and inline elements. We also assume that readers are acquainted with PhotoShop and XHTML basics.

A Beginner’s Cascading Style Sheets Reference, explaining CSS’ basics may be downloaded from here. Links to various CSS resources are available at the Appendix section of this document. We also provide Basics of Telerik RadControls for ASP.NET CSS Skinning Reference, containing simple tips and tricks for creating skins for our WebForms suite.

Contents:

Step 1: Preparations

1.1. Choosing the Right Skin to Edit
1.2. Getting the Skin
1.3. Setting the Skin

Step 2: Css classes for root items

2.1. The Normal State
2.2. The Hover State

Step 3: Css classes for child items

3.1. The Normal State
3.2. The Hover State

Step 4: The separator

5. Advanced skinning techniques

5.1. Using the .first and .last Auxiliary Classes
5.2. Disabled Menu Items

Appendix:

Diagram of Telerik RadMenu HTML Structure
Example’s Server Tag
Understanding the HTML Output of Telerik RadMenu
Useful Telerik RadMenu Resources
General CSS Knowledge

Next >>

See Also

Customizing the menu Appearance
Understanding the HTML output of Telerik RadMenu
Skins
CSS classes used in Telerik RadMenu HTML output

© 2002-2008 Telerik. All Rights Reserved.


Preparations

Telerik RadMenu v4.4 Send comments on this topic.
Preparations
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Preparations

Glossary Item Box

1.1. CHOOSING THE RIGHT SKIN TO EDIT

A good practice is to modify an existing skin, rather than creating a new one from a scratch.

So, we will take the Default skin of Telerik RadMenu:

menu with default skin

…and will finally get the following result (Green, a.k.a. CssGreen) without using any images, except the arrow images:

menu with CssGreen skin

TIP: You can modify a running example from the live examples of Telerik RadMenu’s installation (access from the Telerik program group in the Start Menu), or you can create an .aspx page and paste the markup below. For detailed visual explanation of the html structure, follow this link to the appendix of the tutorial.
Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="Default">
<Items>
<rad:RadMenuItem Text="File">
<Items>
<rad:RadMenuItem Text="New...">
<Items>
<rad:RadMenuItem Text="File"></rad:RadMenuItem>
<rad:RadMenuItem Text="Folder"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Open"></rad:RadMenuItem>
<rad:RadMenuItem IsSeparator="true"></rad:RadMenuItem>
<rad:RadMenuItem Text="Exit"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Edit">
<Items>
<rad:RadMenuItem Text="Cut"></rad:RadMenuItem>
<rad:RadMenuItem Text="Copy"></rad:RadMenuItem>
<rad:RadMenuItem Text="Paste"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Help" Enabled="false"></rad:RadMenuItem>
</Items>
</rad:RadMenu>

1.2. GETTING THE SKIN

Go to ~/RadControls/Menu/Skins/ folder and copy the Default folder, and rename it to Green. Then open Green/styles.css and replace all instances of _Default with _Green and save the file:

replace default with cssgreen

1.3. SETTING THE SKIN

In your server declaration change the skin property to Green…

Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="Green">…</rad:RadMenu>

… And then reload the page. The new skin will look exactly the same as Default skin, but named Green:

menu with default skin look

<< Previous Next >>

© 2002-2008 Telerik. All Rights Reserved.


Css classes for root items

Telerik RadMenu v4.4 Send comments on this topic.
Css classes for root items
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Css classes for root items

Glossary Item Box

2.1. THE NORMAL STATE

normal state for root items

Before we start, please take a look at the DOM-tree of Telerik RadMenu:

Copy Code
<li class="item first">
<a href="#" id="" class="link">
<span class="text">File</span>
</a>
</li>
TIP: For detailed visual explanation of the html structure, follow this link to the appendix of the tutorial.

The class that controls the visual appearance of all menu items is the .item, but in our case, the class in question is the link, to which we set the background-color and line-height of 26 pixels:

Copy Code
.RadMenu_Green .link
{
background: #bedab4;
line-height: 26px;
color: black;
text-decoration: none;
}
TIP: Hit F5 to reload the page and witness the changes to the design.

2.2. THE HOVER STATE

hover state for root items

The hover state of Telerik RadMenu items is natively achieved by the pseudo class hover:, i.e.:

Copy Code
.RadMenu_Green .link:hover,
.RadMenu_Green .focused,
.RadMenu_Green .expanded
{
border-top: solid 1px #6baf5a;
border-bottom: solid 3px #e88a15;
background: #93c57d;
line-height: 21px;
}

A closer look at the hover state reveals that there is another light green top border, below the dark-green one. To achieve it, we make use of the third nested class - .text, which is, as a matter of fact a <span></span>:

Copy Code
.RadMenu_Green .link:hover .text,
.RadMenu_Green .focused .text,
.RadMenu_Green .expanded .text
{
border-top: solid 1px #aad199;
}
TIP: Hit F5 to reload the page and witness the changes to the design.

<< Previous Next >>

© 2002-2008 Telerik. All Rights Reserved.


Css classes for child items

Telerik RadMenu v4.4 Send comments on this topic.
Css classes for child items
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Css classes for child items

Glossary Item Box

3.1. THE NORMAL STATE

Before we start, please take a look at the DOM-tree of Telerik RadMenu:

Copy Code
<ul class="vertical group level1">
<li class="item">
<a href="#" id="" class="link">
<span class="text">Open</span>
</a>
</li>
</ul>

group norma state

For detailed html structure, server declaration and css overview, please, follow this link to the appendix of the tutorial.

The class, that controls the overall visual appearance of the child items is the .group class.

Please, before we start, take a look at the html output of Telerik RadMenu in the appendix.

Copy Code
.RadMenu_Green .group
{
border-right: solid 1px #c2e3bf; /* set right border by design */
}

.RadMenu_Green .group .link
{
background: #e6eee4;
border-top: solid 1px white;
border-left: solid 1px #c2e3bf;
border-bottom: solid 1px #c2e3bf;
text-align: left;
line-height: 25px;
}

3.2. THE HOVER STATE

hover state for child items

Copy Code
.RadMenu_Green .group .link:hover,
.RadMenu_Green .group .focused,
.RadMenu_Green .group .expanded
{
background: #bedab4;
border-bottom: solid 1px #e88a15;
}

.RadMenu_Green .group .link:hover .text,
.RadMenu_Green .group .focused .text,
.RadMenu_Green .group .expanded .text
{
border-top: 0; /* override the inherited border */
}

<< Previous Next >>

© 2002-2008 Telerik. All Rights Reserved.


The separator

Telerik RadMenu v4.4 Send comments on this topic.
The separator
Controlling the visual appearance > Creating a skin for Telerik RadMenu > The separator

Glossary Item Box

A Telerik RadMenu item could be set as a separator using the IsSeparator="true" property, as shown below:

Copy Code
<rad:RadMenuItem IsSeparator="true"></rad:RadMenuItem>

And the resulting html output will be:

Copy Code
<li id="" class="item separator ">
<span class="text"></span>
</li>

… and we can see that it’s visual appearance is controlled by the .separator class, so we style its innermost element - the .text class:

Copy Code
.RadMenu_Green .vertical .separator .text
{
padding-top: 2px; /* use padding instead of height */
background: #dbe5d8;
font-size: 1px; /* IE height fix */
}

Please, refer to this article for detailed explanation on creating horizontal and vertical separators to the root items and child items.

Hit F5 to reload the page and witness the changes to the design

<< Previous Next >>

© 2002-2008 Telerik. All Rights Reserved.


Advanced skinning techniques

Telerik RadMenu v4.4 Send comments on this topic.
Advanced skinning techniques
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Advanced skinning techniques

Glossary Item Box

5.1. ACHIEVING DIFFERENT LOOKS FOR THE FIRST AND LAST ITEMS (.first AND .last CLASSES)

Copy Code
<li class="item first">
<a href="#" id="" class="link">
<span class="text">New...</span>
</a>
</li>

<li class="item last">
<a href="#" id="" class="link">
<span class="text">Paste</span>
</a>
</li>

By default, Telerik RadMenu uses two auxiliary classes - .first and .last that immensely increase it’s skinning capabilities. The .first class is applied to every first .item class, and the .last one – to the last .item class on every level of Telerik RadMenu. Please, have a look at our Inox, Office2007 and Robotic skins – they make heavy use of these two classes for skinning the first and last items of the group:

The first item:

Copy Code
.RadMenu_Office2007 .group .first .link
{
background: transparent url('img/MenuItemBgFirst.gif') no-repeat left bottom;
line-height: 58px;
}

…and the last one:

Copy Code
.RadMenu_Office2007 .group .last .link
{
background: transparent url('img/MenuItemBgLast.gif') no-repeat;
line-height: 58px;
}

By accessing the .link and .text classes through the .first and respectively .last auxiliary classes we are able to create completely different looks for these items if the design requires.

5.2. DISABLED MENU ITEMS

To disable a menu item, use the Enabled="false" property:

Copy Code
<rad:RadMenuItem Text="Help" Enabled="false"></rad:RadMenuItem>

… It will result in the following html markup:

Copy Code
<li class="item last">
<a href="#" id="" disabled="disabled" class="link disabled">
<span class="text">Help</span>
</a>
</li>

Please, have in mind that the default behavior of the disabled=”disabled” property in Internet Explorer mimics the disabled items in Windows, as shown from the Internet Explorer screenshot below:

disabled style for IE

… and such items’ font color is not susceptible to skinning.

That issue, however is not present in Gecko (Mozilla FireFox, Netscape, Opera, SeaMonkey, etc.) browsers, so you may use the auxiliary .disabled class to visualize that the item is disabled:

Copy Code
<li class="item last">
<a href="#" id="" disabled="disabled" class="link disabled">
<span class="text">Help</span>
</a>
</li>

… and the css declaration:

Copy Code
.RadMenu_Green .disabled
{
color: #666; /* become grey if the item is disabled */
}

The result in Internet Explorer (notice how “Help” item looks embossed) will be:

disabled style for IE with green skin

… and for Mozilla Firefox (notice the gray #666 color in “Help” item):

disabled style for FF with green skin

<< Previous Next >>

© 2002-2008 Telerik. All Rights Reserved.


Appendix

Telerik RadMenu v4.4 Send comments on this topic.
Appendix
Controlling the visual appearance > Creating a skin for Telerik RadMenu > Appendix

Glossary Item Box

DIAGRAM OF Telerik RadMenu HTML STRUCTURE

EXAMPLE’S SERVER TAG

Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="Green">
<Items>
<rad:RadMenuItem Text="File">
<Items>
<rad:RadMenuItem Text="New...">
<Items>
<rad:RadMenuItem Text="File"></rad:RadMenuItem>
<rad:RadMenuItem Text="Folder"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Open"></rad:RadMenuItem>
<rad:RadMenuItem IsSeparator="true"></rad:RadMenuItem>
<rad:RadMenuItem Text="Exit"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Edit">
<Items>
<rad:RadMenuItem Text="Cut"></rad:RadMenuItem>
<rad:RadMenuItem Text="Copy"></rad:RadMenuItem>
<rad:RadMenuItem Text="Paste"></rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Help" Enabled="false"></rad:RadMenuItem>
</Items>
</rad:RadMenu>

USEFUL Telerik RadMenu RESOURCES

  • Overview of Telerik RadMenu
  • Understanding the HTML Output of Telerik RadMenu
  • Online skinning examples
  • Basics of Telerik RadControls for ASP.NET skinning
  • Telerik RadMenu online help
  • Telerik RadMenu support forums

GENERAL CSS KNOWLEDGE

  • World Wide Web Consortium CSS specifications
  • W3 Schools CSS tutorial
  • Guide to Cascading Style Sheets

<< Previous

© 2002-2008 Telerik. All Rights Reserved.


Understanding the HTML output of Telerik RadMenu

Telerik RadMenu v4.4 Send comments on this topic.
Understanding the HTML output of Telerik RadMenu
See Also
Controlling the visual appearance > Understanding the HTML output of Telerik RadMenu

Glossary Item Box

To change the menu appearance, you may sometimes need to go beyond the exposed appearance properties and change the CSS file that represents the skin. Therefore, it is important to understand the HTML structure of the menu.

The easiest way to demonstrate what goes on is by example.

The ASP.NET definition

Below is a simple menu definition:

  • The menu has three items.
  • The first two items have two children each.
  • The last item is disabled.
Copy Code
<rad:RadMenu runat="server" ID="RadMenu1" Skin="Outlook">
<Items>
<rad:RadMenuItem Text="Root Item 1" NavigateUrl="~/Page1.aspx">
<Items>
<rad:RadMenuItem Text="Child Item 1" NavigateUrl="~/Page11.aspx" />
<rad:RadMenuItem Text="Child Item 2" NavigateUrl="~/Page12.aspx" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Root Item 2" NavigateUrl="~/Page2.aspx">
<Items>
<rad:RadMenuItem Text="Child Item 1" NavigateUrl="~/Page21.aspx" />
<rad:RadMenuItem Text="Child Item 2" NavigateUrl="~/Page22.aspx" />
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Enabled="False" Text="Root Item 3" NavigateUrl="~/Page3.aspx" />
</Items>
</rad:RadMenu>

Rendered HTML output

When rendered, the definition produces the output listed below.

Some parts of the markup - which are not related to the final presentation - have been removed (e.g. element ID attributes, JavaScript initialization code etc.)
Copy Code
<div id="RadMenu1" class="radmenu RadMenu_Outlook ">
<ul class="horizontal rootGroup">
<li class="item first">
<a href="/NET2/Page1.aspx" class="link"><span class="text">Root Item 1</span></a>
<div class="slide">
<ul class="vertical group level1">
<li class="item first">
<a href="/NET2/Page11.aspx" class="link"><span class="text">Child Item 1</span></a>
</li>
<li class="item last">
<a href="/NET2/Page12.aspx" class="link"><span class="text">Child Item 2</span></a>
</li>
</ul>
</div>
</li>
<li class="item">
<a href="/NET2/Page2.aspx" class="link"><span class="text">Root Item 2</span></a>
<div class="slide">
<ul class="vertical group level1">
<li class="item first">
<a href="/NET2/Page21.aspx" class="link"><span class="text">Child Item 1</span></a>
</li>
<li class="item last">
<a href="/NET2/Page22.aspx" class="link"><span class="text">Child Item 2</span></a>
</li>
</ul>
</div>
</li>
<li class="item last">
<a href="/NET2/Page3.aspx" disabled="disabled" class="link disabled"><span class="text">Root Item 3</span></a>
</li>
</ul>
</div>

The control is rendered as a DIV element, and the item hierarchy is presented as nested unordered lists with links inside. This, by far, is the most natural and semantic way to represent a navigation element with the existing HTML tags toolbox.

Here is a more detailed breakdown of the rendered markup:

Root tag

The menu is rendered as a DIV tag. Here is an excerpt from the example above:

Copy Code
<div id="RadMenu1" class="radmenu RadMenu_Outlook ">
<!-- menu content goes here -->
</div>

The ID attribute of the DIV tag is set to the ClientID property of the RadMenu control. As you can see two CSS classes have been applied: "radmenu" and "RadMenu_Outlook". The "radmenu" class is always applied. It defines the basic presentation of the menu which is common for all skins. The "RadMenu_Outlook" class is applied because the Skin of the menu is set to "Outlook". If the the menu does not use a skin (the Skin property is set to "None") only the "radmenu" CSS class would be rendered.

If you set the Style or CssClass property of the RadMenu control they would be applied to the root menu tag:

Copy Code
<rad:RadMenu runat="server" ID="RadMenu1" Skin="Outlook" CssClass="MyMenu" Style="position:relative; z-index: 1000">
Copy Code
<div id="RadMenu1" class="radmenu RadMenu_Outlook MyMenu" style="position:relative; z-index: 1000">

Root item group

The root item group renders as a UL (unordered list) tag:

It has two CSS classes applied: "horizontal" and "rootGroup". The "horizontal" class is applied because the Flow of the RadMenu is horizontal by default. If it were vertical that CSS class would be "vertical". The "rootGroup" CSS class is always rendered.

Menu items

Menu item renders as a LI (list item) tag, containing an A (link or anchor) tag. The text of the item is rendered inside a SPAN tag:

The LI tag has its class attribute always set to "item". If the item is the first child of its parent it also has the "first" CSS class applied:

If the item is the last child of its parent it has the "last" CSS class applied:

If the item is the only child of its parent it has both the "first" and "last" CSS classes applied:

The A tag has its class attribute always set to "link":

If the Style or CssClass properties of the RadMenuItem class are set they are applied to the A tag:

Item states

The information above is valid for items in normal state. For items not in normal state, a few other CSS classes or attributes are dynamically applied:

Disabled items

When a menu item is disabled the "disabled" attribute of the A tag is set and one additional CSS class - "disabled" - is applied:

Focused items

An item is focused when clicked or when it is selected with the keyboard (by using the TAB key or a shortcut - access key). When an item is focused one additional CSS class - "focused" is applied to the A tag:

Expanded items

An item is expanded when the user hovers it with the mouse. When an item is expanded one additional CSS class - "expanded" is applied to the A tag:

Clicked items

An item is clicked when the user clicks it with the mouse and keeps the mouse button pressed. When an item is in clicked state one additional CSS class - "clicked" is applied to the A tag:

When the user releases the mouse button, the clicked css class is removed. This css class is useful to visually show that a button is clicked.

Child item groups

If the item has children they are rendered in an UL tag within the LI tag of their parent item:

The DIV tag whose class attribute is set to "slide" is used by the animation effects. It is not related with the final appearance and can be ignored.

The child item group has three CSS classes applied: "vertical", "group" and "level1". The "vertical" class is applied because the default item flow for child items is vertical. If it were horizontal (GroupSettings-Flow="Horizontal") that class would have been "horizontal". The "group" class is always applied for child item groups. The "level1" class is applied for all level 1 item groups. Root items are considered as level 0, their children are level 1, their children's children are level 2 and so on.

Section 3: Graphic representation of the HTML output:

See Also

Change the menu images
Change the look of item states
Change the look of hovered items
Separators
Create scrollable items

© 2002-2008 Telerik. All Rights Reserved.


CSS classes used in Telerik RadMenu HTML output

Telerik RadMenu v4.4 Send comments on this topic.
CSS classes used in Telerik RadMenu HTML output
Controlling the visual appearance > CSS classes used in Telerik RadMenu HTML output

Glossary Item Box

Class Name

Element

Description

RadMenu_[Skin]

e.g. RadMenu_Outlook

DIV

Applied to the root element of the menu.

rootGroup

UL

Applied to the first level item container (root item group).

vertical

UL

Applied to a the item container if the item flow is horizontal.

horizontal

UL

Applied to a the item container if the item flow is vertical.

group

UL

Applied to each item container except the root level one.

level[n]

UL

Applied to item containers at the respective level.

item

LI

Applied to the LI elements enclosing each item.

link

A

Applied to the anchors representing each item in its default state.

focused

A

Applied to the item's anchor when it is focused by either the mouse or the keyboard.

clicked

A

Applied to the item's anchor the user clicks the item.

expanded

A

Applied to the item's anchor tag when the item is opened.

disabled

A

Applied to the item's anchor when the item is disabled.

text

SPAN

Applied to the SPAN element which encloses item's text.

leftArrow

A

Applied to the left scrolling arrow. Scrolling arrows are dynamically created. Use that CSS class to customize the appearance of the left scrolling arrow (used in horizontal item flow).

rightArrow

A

Applied to the right scrolling arrow. Scrolling arrows are dynamically created. Use that CSS class to customize the appearance of the right scrolling arrow (used in horizontal item flow).

topArrow

A

Applied to the top scrolling arrow. Scrolling arrows are dynamically created. Use that CSS class to customize the appearance of the top scrolling arrow (used in vertical item flow).

bottomArrow

A

Applied to the bottom scrolling arrow. Scrolling arrows are dynamically created. Use that CSS class to customize the appearance of the bottom scrolling arrow (used in vertical item flow).

leftArrowDisabled

A

Applied to the left scrolling arrow if there is no scroll space left.

rightArrowDisabled

A

Applied to the right scrolling arrow if there is no scroll space left.

topArrowDisabled

A

Applied to the top scrolling arrow if there is no scroll space left.

bottomArrowDisabled

A

Applied to the bottom scrolling arrow if there is no scroll space left.

expandLeft

SPAN

Applied to the SPAN element which encloses each item text if the item has child items and will expand to the right. Use that CSS class to specify the arrow image via the background CSS attribute. Tweak the right padding to make it appear after the text.

.RadMenu_Outlook .expandLeft
{
background:transparent url(img/groupImage.gif) right center no-repeat;
padding-right:10px;
}

expandTop

SPAN

Applied to the SPAN element which encloses each item text if the item has child items and will expand to the bottom. Use that CSS class to specify the arrow image via the background CSS attribute. Tweak the right padding to make it appear after the text.

.RadMenu_Outlook .expandTop
{
background:transparent url(img/groupImage.gif) right center no-repeat;
padding-right:10px;
}

expandBottom

SPAN

Applied to the SPAN element which encloses each item text if the item has child items and will expand to the top. Use that CSS class to specify the arrow image via the background CSS attribute. Tweak the right padding to make it appear after the text.

.RadMenu_Outlook .expandBottom
{
background:transparent url(img/groupImage.gif) right center no-repeat;
padding-right:10px;
}

expandRight

SPAN

Applied to the SPAN element which encloses each item text if the item has child items and will expand to the left. Use that CSS class to specify the arrow image via the background CSS attribute. Tweak the right padding to make it appear after the text.

.RadMenu_Outlook .expandRight
{
background:transparent url(img/groupImage.gif) right center no-repeat;
padding-right:10px;
}

separator

LI

Applied to the LI elements enclosing an item with IsSeparator set to true.

context

DIV

Applied to the root menu element if the menu is context.

RadMenu_[SkinName]_Context

e.g.

RadMenu_Outlook_Context

DIV

Applied to the root menu element if the menu is context. Use that CSS class to customize the appearance when the control is used as a context menu.

first

LI

Applied to the first item in a menu item group. Use that CSS class to customize the appearance of the first item only:

.RadMenu_Office2007 .group .first .link
{
background: transparent url('img/MenuItemBgFirst.gif') no-repeat left bottom;
line-height: 58px;
}

last

LI

Applied to the last item in a menu item group. Use that CSS class to customize the appearance of the first item only:

.RadMenu_Office2007 .group .last .link
{
background: transparent url('img/MenuItemBgLast.gif') no-repeat;
line-height: 58px;
}

© 2002-2008 Telerik. All Rights Reserved.


Expand effects

Telerik RadMenu v4.4 Send comments on this topic.
Expand effects
Controlling the visual appearance > Expand effects

Glossary Item Box

The following properties allow you to apply animated effects to the expanding and collapsing behavior of Telerik RadMenu:

  • ExpandAnimation / CollapseAnimation
    The properties from these groups specify the animation effect (if any) that accompanies the expanding or collapsing of child items.
    • Duration
      In milliseconds
    • Type
      A list of predefined animation effects to choose from
  • ExpandDelay / CollapseDelay
    These properties set the period of time (in milliseconds) between the mouse entering / leaving a menu item (or clicking the item - if ClickToOpen = "True") and the children starting to expand or collapse respectively.

You can also tweak the expanding and collapsing direction of any group of child items. See Expand and Collapse Behavior.

© 2002-2008 Telerik. All Rights Reserved.


Change the look of hovered items

Telerik RadMenu v4.4 Send comments on this topic.
Change the look of hovered items
See Also
Controlling the visual appearance > How to > Change the look of hovered items

Glossary Item Box

The menu item renders as an anchor (A) tag (inside a list item (LI)). Therefore you can use the :hover CSS pseudo selector to customize the hover look of the menu items. The easiest way is to edit the CSS file of your skin.

Underline the text of the hovered items

We will use the CssBlue skin for the example.

  1. Open ~/RadControls/Menu/Skins/CssBlue/style.css.
  2. Create a new CSS rule in the following way:

    Copy Code
    .RadMenu_CssBlue .link:hover
    {
    }

    This CSS rule will be applied to all items when the user hovers them with the mouse.
  3. Make the text underlined by setting the "text-decoration" CSS attribute:

    Copy Code
    .RadMenu_CssBlue .link:hover
    {
    text-decoration: underline;
    }
    Now the item text will be underlined when hovered with the mouse:

Change the cursor of hovered items

To change the cursor edit the CSS rule mentioned above and set the "cursor" CSS attribute:

Copy Code
.RadMenu_CssBlue .link:hover
{
text-decoration: underline;
cursor:pointer;
}

Now the cursor will change to "pointer" when the user hovers the item with the mouse:

Change the foreground/background of hovered items

Edit the CSS rule described earlier and set the "background-color" or "text" CSS attributes. You could apply the "!important" modifier if there is a more specific CSS rule which prevents your changes (as in the CssBlue skin):

Copy Code
.RadMenu_CssBlue .link:hover
{
text-decoration: underline;
cursor:pointer;
color:white;
background-color: Aqua !important; /* Override the default */
}

In some cases skin modifications may not apply. This occurs if there is a more specific CSS rule which overrides your settings. Here is an example:

.RadMenu_CssBlue .group .link:hover
{
color:green;
}

.RadMenu_CssBlue .link:hover
{
color:red;
}

In this case the first CSS rule is more specific than the second and the color for hovered items would remain green. To make your settings always apply you can use the "!important" modifier. Or ever better - find the other CSS rule and apply your changes there. In the example mentioned above you can amend the second CSS rule like this (or simply edit the first rule):

.RadMenu_CssBlue .link:hover
{
color:red !import;
}

Changing the hover state when the CssClass property of the item is set

In some cases the user needs to specify unique appearance for some item. This can be achieved by using the CssClass property of the RadMenuItem class. Here is a quick example:

Copy Code
<style>
.CustomItem
{
font-weight: bold;
color: red !important; /*Override the default setting*/
}
</style>
<rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
<Items>
<rad:RadMenuItem Text="Root Item 1" CssClass="CustomItem" />
<rad:RadMenuItem Text="Root Item 2" />
<rad:RadMenuItem Text="Root Item 3" />
</Items>
</rad:RadMenu>

To change the appearance for the hover state of that item define a new CSS rule in the following way:

Copy Code
<style>
.CustomItem
{
font-weight: bold;
color: red !important;
}
.CustomItem:hover
{
color: white !important;
}
</style>

The ":hover" pseudo selector is used to customize the hover state. The ".CustomItem:hover" CSS rule applies only for the item whose CssClass property has been set to "CustomItem".

Here is how the end result looks like:

Normal state:

Hover state:

See Also

Understanding the HTML output of Telerik RadMenu
Change the look of item states

© 2002-2008 Telerik. All Rights Reserved.


Change the look of item states

Telerik RadMenu v4.4 Send comments on this topic.
Change the look of item states
See Also
Controlling the visual appearance > How to > Change the look of item states

Glossary Item Box

Description of item states:

Menu items can have the following states - normal, focused, clicked, expanded and disabled.

  • Default - the default state of the item.
  • Focused - when the item accepts focus either via mouse or keyboard.
  • Clicked - when the user clicks the item with the mouse until she releases the button.
  • Expanded - when the children of the item are shown.
  • Disabled - when the Enabled property of the item is set to false.

The appearance of those states is defined in the skin CSS file. Each state is denoted by a CSS rule which contains a special CSS class. Check
CSS classes used in the structure for more info.

Note that most skins in the RadControls folder do not have a "clicked" style defined. In such cases the clicked state will be the same as the focused state.

Customizing the appearance of the state of specific items

Each item state can be customized by setting a property of the particular item. The available properties follow:

  • CssClass - controls the appearance when the item is in the Default state.
  • FocusedCssClass - controls the appearance when the item is focused. The default value of this property is "focused".
  • ExpandedCssClass - controls the appearance when the item is expanded. The default value of this property is "expanded".
  • ClickedCssClass - controls the appearance when the item is clicked. The default value of this property is "clicked".
  • DisabledCssClass - controls the appearance when the item is disabled. The default value of this property is "disabled".

We will show how to tweak the look of the focused state for example.

Suppose that you are using the Outlook skin. The original look of the focused state is like in the picture below:

The following steps will tweak the default look:

1. Define a new CSS rule for the focused state either in the css file of the Outlook skin or in the head tag of the aspx page:

Copy Code
<head runat="server">
<style type="text/css">

.customFocused
{
background-color:Red;
border:1px solid #002D96;
padding:2px 4px;
}
</style>
</head>

2. Set the FocusedCssClass for the menu item:

Copy Code
<rad:RadMenuItem runat="server" Text="This" FocusedCssClass="customFocused">
</rad:RadMenuItem>

The end result will be:

See Also

Understanding the HTML output of Telerik RadMenu
Change the look of hovered items

© 2002-2008 Telerik. All Rights Reserved.


Specify the top level items appearance

Telerik RadMenu v4.4 Send comments on this topic.
Specify the top level items appearance
Controlling the visual appearance > How to > Specify the top level items appearance

Glossary Item Box

Top (root) level items are rendered inside an UL tag whose CSS class attribute is set to "rootGroup":

Copy Code
<ul class="horizontal rootGroup">
<!-- root items go here -->
</ul>

You can use the following CSS rule to address top (root) level items:

Copy Code
.rootGroup .item
{
}

This rule would apply to the list item elements (LI) representing the first level item. If you need to address the anchor elements (A) of the menu items you should use the following CSS rule:

Copy Code
.rootGroup .item .link
{
}

For example to change the color of first level items you can use the following:

Copy Code
.rootGroup .item .link
{
color:red;
}

You would notice that the color of child items has changed as well. This is due to the cascading behavior of CSS - the color attribute is inherited by the child items because they are nested inside first level items. You may need to negate that effect. Use the following CSS rule to achieve it:

Copy Code
.group .item .link
{
color:black;
}

Child items are rendered inside an UL tag whose CSS class attribute is set to "group". The CSS rule above would apply to all but root level items and would change the color of those items to black.

© 2002-2008 Telerik. All Rights Reserved.


Specify the child items appearance

Telerik RadMenu v4.4 Send comments on this topic.
Specify the child items appearance
Controlling the visual appearance > How to > Specify the child items appearance

Glossary Item Box

Child items are rendered inside an UL tag nested in the LI tag of their parent item:

Copy Code
<ul class="vertical group level1">
<!-- child items -->
</ul>

You can use the following CSS rule to all but top (root) level items:

Copy Code
.group .item
{
}

This rule would apply to the list item elements (LI). If you need to address the anchor elements (A) of the menu items you should use the following CSS rule:

Copy Code
.group .item .link
{
}

For example to change the color of all child items items you can use the following:

Copy Code
.group .item .link
{
color:red;
}

You can also set the color of child items based on their level of nesting:

Copy Code
.level1 .item .link
{
color:red;
}
.level2 .item .link
{
color:blue;
}

This would make the foreground color of level 1 items (children of top level ones) red and the color of their children would be blue.

© 2002-2008 Telerik. All Rights Reserved.


Specify the separator appearance

Telerik RadMenu v4.4 Send comments on this topic.
Specify the separator appearance
Controlling the visual appearance > How to > Specify the separator appearance

Glossary Item Box

Separators are menu items whose IsSeparator property is set to true. Separators are rendered in the following way:

Copy Code
<li class="item separator">
<span class="text"></span>
</li>

You can use the separator CSS class to create CSS rules applying only to separator items. Here is an example from the CssBlue skin:

Copy Code
.RadMenu_CssBlue .vertical .separator .text
{
background: #d4e5eb;
font-size:1px;
padding-top: 2px;
border-left: solid 1px #bfcde3;
border-right: solid 1px #bfcde3;
}

That CSS rule would apply only for vertical separators. A vertical separator is the one displayed in vertical item flow. Creating a horizontal separator requires a different approach. You need to set the height and width of the separator item to make it appear since it has no text:

Copy Code
.RadMenu_CssBlue .horizontal .separator
{
background: #d4e5eb;
border-left: solid 1px #bfcde3;
border-right: solid 1px #bfcde3;
width:2px;
height:22px;
}

However the width, height and border of the horizontal separator would propagate down to vertical separators due to CSS cascading:

To eliminate that side effect you should add a new rule for the vertical separator:

Copy Code
.RadMenu_CssBlue .vertical .separator
{
height:auto;
width:auto;
border:0;
}

© 2002-2008 Telerik. All Rights Reserved.


Specify the appearance of the whole item group

Telerik RadMenu v4.4 Send comments on this topic.
Specify the appearance of the whole item group
Controlling the visual appearance > How to > Specify the appearance of the whole item group

Glossary Item Box

You can use the .group and .rootGroup CSS classes to customize the appearance of the whole menu item group. For example to create a border around all items in the group you can use the following CSS rule (assuming the menu skin is set to "CssBlue"):

Copy Code
.RadMenu_CssBlue .group
{
border:1px solid red !important;
}

End result should look like this:

© 2002-2008 Telerik. All Rights Reserved.


Create scrollable items

Telerik RadMenu v4.4 Send comments on this topic.
Create scrollable items
See Also
Controlling the visual appearance > How to > Create scrollable items

Glossary Item Box

Creating scrollable items

To create scrollable items just set the GroupSettings-Height property for vertical groups or the GroupSettings-Width for horizontal groups to a value less than the height or width of the child items group. For example:

Copy Code
<rad:RadMenu ID="RadMenu1" Skin="Outlook" runat="server">
<Items>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="This" GroupSettings-Height="100">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

The above code will yield the following:

See Also

Customizing the Menu Appearance
Understanding the HTML output of Telerik RadMenu
Change the look of item states
Change the look of hovered items

© 2002-2008 Telerik. All Rights Reserved.


Specify the appearance of the scrolling images

Telerik RadMenu v4.4 Send comments on this topic.
Specify the appearance of the scrolling images
Controlling the visual appearance > How to > Specify the appearance of the scrolling images

Glossary Item Box

Replacing the arrows with custom ones

You can replace the arrows of the scroll groups. To do this, find the css file of the skin and simply specify a different url for topArrow, bottomArrow, leftArrow, or rightArrow. For example:

Copy Code
RadMenu_Outlook .topArrow,
.RadMenu_Outlook .topArrowDisabled
{
background: #e3efff url('img/yourArrowTop.gif') center center no-repeat;
width: 100%;
}
.RadMenu_Outlook .bottomArrow,
.RadMenu_Outlook .bottomArrowDisabled
{
background: #e3efff url('img/yourArrowBottom.gif') center center no-repeat;
width: 100%;
}

© 2002-2008 Telerik. All Rights Reserved.


Use images to set the appearance of the menu

Telerik RadMenu v4.4 Send comments on this topic.
Use images to set the appearance of the menu
See Also
Controlling the visual appearance > How to > Use images to set the appearance of the menu

Glossary Item Box

The appearance of the menu can be set entirely with images, without using skins or custom CSS styles.

The MenuItem class exposes the ImageUrl and ImageOverUrl properties. These allow you to have one image for the initial state of a menu item and another image for the hover state.

Example

The menu in Pic. 1 is entirely composed of images, using the ImageUrl and ImageOverUrl properties. The Skin property is set to "None".

Pic. 1

An image-only menu

ASPX Copy Code
<rad:RadMenu id="RadMenu1" runat="server" Skin="None" Flow="Vertical">
<Items>
<rad:RadMenuItem ImageUrl="Images/Products.gif" ImageOverUrl="Images/ProductsOver.gif">
<Items>
<rad:RadMenuItem ImageUrl="Images/Flowers.gif" ImageOverUrl="Images/FlowersOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Pots.gif" ImageOverUrl="Images/PotsOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Books.gif" ImageOverUrl="Images/BooksOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Antiques.gif" ImageOverUrl="Images/AntiquesOver.gif"/>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem ImageUrl="Images/Services.gif" ImageOverUrl="Images/ServicesOver.gif">
<Items>
<rad:RadMenuItem ImageUrl="Images/Flowers.gif" ImageOverUrl="Images/FlowersOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Pots.gif" ImageOverUrl="Images/PotsOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Books.gif" ImageOverUrl="Images/BooksOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Antiques.gif" ImageOverUrl="Images/AntiquesOver.gif"/>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem ImageUrl="Images/Company.gif" ImageOverUrl="Images/CompanyOver.gif">
<Items>
<rad:RadMenuItem ImageUrl="Images/Flowers.gif" ImageOverUrl="Images/FlowersOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Pots.gif" ImageOverUrl="Images/PotsOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Books.gif" ImageOverUrl="Images/BooksOver.gif"/>
<rad:RadMenuItem ImageUrl="Images/Antiques.gif" ImageOverUrl="Images/AntiquesOver.gif"/>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

See Also

Skins

© 2002-2008 Telerik. All Rights Reserved.


Control the positioning of the image (ImageUrl)

Telerik RadMenu v4.4 Send comments on this topic.
Control the positioning of the image (ImageUrl)
Controlling the visual appearance > How to > Control the positioning of the image (ImageUrl)

Glossary Item Box

This topic shows how to control the positioning of the image that is set through the ImageUrl property.

Adjusting a dispositioned image

A common scenario for some skins is when the text of the menu item is too long the image is placed above the text. Here is an example with the CssGreen skin:

Copy Code
<rad:RadMenu ID="RadMenu3" Skin="CssGreen" runat="server" >
<Items>
<rad:RadMenuItem ID="RadMenuItem5" runat="server" Text="File">
<Items>
<rad:RadMenuItem ID="i1" runat="server" ImageUrl="right.gif" Text="Options">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenu>
The above code yields the following menu:

Our goal is to make the menu look like this:

The key to controlling the positioning of the image is understanding the html structure of the rendered output of the Telerik RadMenu. In this case, the child item will have the following html output:

Copy Code
<li class="item first">
<a href="#" id="RadMenu1_m0_m0" class="link">
<img alt="" src="right.gif" class="leftImage" />
<span class="text">Options</span>
</a>
</li>

Note, that that the " <a> . . . </a>" wrapper with class link contains the image and the text. Also, the <img> element has class="leftImage" by default.

Steps to achieve the goal:

A good approach is to override classes in the head tag of the page and leave the original css files unchanged.

1. We need to increase the distance between the leftmost edge of the child item and the wrapped elements (image and text).

increased left padding

We will do so by setting the left padding attribute of the link class:

Copy Code
<head runat="server">
<style type="text/css">
.RadMenu_CssGreen .customClass
{
padding-left:10px !important;
}
</style>
</head>
Apply the customClass to the menu item through the CssClass property:
Copy Code
<rad:RadMenuItem ID="i1" CssClass="customClass" runat="server" ImageUrl="right.gif" Text="Options">

The rendered output for the <a> wrapper will be:

Copy Code
<a href="#" id="RadMenu3_m0_m0" class="link customClass">

2. Position the image by setting the margin attributes of the LeftImage class:

Copy Code
<head runat="server">
<style type="text/css">
.RadMenu_CssGreen .customClass
{
padding-left:10px !important;
}

.RadMenu_CssGreen .customClass .leftImage
{
margin-left:-10px !important; /* moves the image 10px to the left */
margin-top: 5px !important; /* moves the image 5px down */
}
</style>
</head>

The rendered output for the image element is:

Copy Code
<img alt="" src="right.gif" class="leftImage" />

This completes our objective.

Other Scenarios

The above example showed how to control the positioning of the image through the margin attributes of the LeftImage class. It is also possible to simulate a RightLogo property by overriding the LeftImage class.

Copy Code
<head runat="server">
<style type="text/css">
.RadMenu_CssGreen .rightItem .leftImage
{
float: right !important;
}
</style>
</head>
Copy Code
<rad:RadMenuItem runat="server" CssClass="rightItem" ImageUrl="13Save.gif" Text="Save">

© 2002-2008 Telerik. All Rights Reserved.


Wrap item text

Telerik RadMenu v4.4 Send comments on this topic.
Wrap item text
Controlling the visual appearance > How to > Wrap item text

Glossary Item Box

By default long item text is not wrapped. Consider the following example:

Copy Code
<rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
<Items>
<rad:RadMenuItem Text="Root Item 1">
<Items>
<rad:RadMenuItem Text="This is the item with the very long text" />
<rad:RadMenuItem Text="Child Item 2" >
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Root Item 2" />
</Items>
</rad:RadMenu>

It would lead to this:

This could not be the desired appearance. To wrap the text you should use the "whites-space" css attribute. There are two ways to wrap the text:

  1. Use the inline style of the item (the Style property):
    Copy Code
    <rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
    <Items>
    <rad:RadMenuItem Text="Root Item 1">
    <Items>
    <rad:RadMenuItem Text="This is the item with the very long text" style="white-space:normal" />
    <rad:RadMenuItem Text="Child Item 2" >
    <Items>
    <rad:RadMenuItem runat="server" Text="Child RadMenuItem">
    </rad:RadMenuItem>
    </Items>
    </rad:RadMenuItem>
    </Items>
    </rad:RadMenuItem>
    <rad:RadMenuItem Text="Root Item 2" />
    </Items>
    </    rad:RadMenu>

  2. Specify custom CSS class for that item:

    Copy Code
    <style>
    .MyItem
    {
    white-space: normal;
    }
    </style>
    <    rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
    <Items>
    <rad:RadMenuItem Text="Root Item 1">
    <Items>
    <rad:RadMenuItem Text="This is the item with the very long text" CssClass="MyItem" />
    <rad:RadMenuItem Text="Child Item 2" >
    <Items>
    <rad:RadMenuItem runat="server" Text="Child RadMenuItem">
    </rad:RadMenuItem>
    </Items>
    </rad:RadMenuItem>
    </Items>
    </rad:RadMenuItem>
    <rad:RadMenuItem Text="Root Item 2" />
    </Items>
    </    rad:RadMenu>

Both approaches would lead to the same result. The first approach is easier to implement while the second one is more reusable - you can assign the CSS class to more than one item to wrap the text. Here is the end result:

You can change the width of the item to achieve better looking results:

Copy Code
<rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
<Items>
<rad:RadMenuItem Text="Root Item 1">
<Items>
<rad:RadMenuItem Width="150px" Text="This is the item with the very long text" style="white-space:normal" />
<rad:RadMenuItem Text="Child Item 2" >
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem Text="Root Item 2" />
</Items>
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


Achieve (semi) transparent effect for menu groups

Telerik RadMenu v4.4 Send comments on this topic.
Achieve (semi) transparent effect for menu groups
Controlling the visual appearance > How to > Achieve (semi) transparent effect for menu groups

Glossary Item Box

To achieve (semi) transparent effect for the menu groups, modify the following classes in the styles.css file of the menu as shown bellow:

Copy Code
.RadMenu_[MySkin] .group
{
background: transparent;
border: 0px;
}

.RadMenu_[MySkin] .group .link
{
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); /*IE*/
-moz-opacity: 0.8; /*FireFox*/

* * *
}

© 2002-2008 Telerik. All Rights Reserved.


Stretch all menu items to fill the entire width of the menu

Telerik RadMenu v4.4 Send comments on this topic.
Stretch all menu items to fill the entire width of the menu
Controlling the visual appearance > How to > Stretch all menu items to fill the entire width of the menu

Glossary Item Box

This topic shows how to stretch all menu items to fill the entire width of the menu.

The following approach accommodates any number of root level menu items:

Copy Code
<script>
function JustifyMenu ()
{
var menu = <%=RadMenu1.ClientID%>;
var width = menu.DomElement.offsetWidth;
var singleItemLength = Math.floor(width/menu.Items.length)-1+"px";
// due to incorrect rounding;
// You may need to subtract a larger number depending on
// the skin that you are using.

for (var i = 0; i < menu.Items.length; i ++)
{
var li = menu.Items[i].DomElement;
li.style.width = singleItemLength;
}
}
window.onresize = window.onload = JustifyMenu;
</script>

<rad:radmenu id="RadMenu1" runat="server" width="100%" />

You can extend the above approach to set variable width values for the root menu items using the following code:

Copy Code
<script type="text/javascript">
function Stretch(menu)
{
var itemPadding = 48;
var itemBorder = 2;
var currentWidth = menu.ChildItemList.offsetWidth;
for (var i = 0; i < menu.Items.length; i ++)
{
var itemDomElement = menu.Items[i].TextElement;
var percentage = itemDomElement.offsetWidth / currentWidth;
var newWidth = Math.round(percentage * menu.DomElement.offsetWidth);
itemDomElement.style.width = newWidth - itemPadding + "px";
if (i == menu.Items.length - 1)
{
var diff = menu.DomElement.offsetWidth - menu.ChildItemList.offsetWidth;
itemDomElement.style.width = newWidth + diff - itemPadding - itemBorder + "px";
}
}
}
</script>

<rad:RadMenu runat="server" ID="RadMenu1" OnClientLoad="Stretch" Width="980px">
<Items>
<rad:RadMenuItem Text="Home" />
<rad:RadMenuItem Text="Where to use" />
<rad:RadMenuItem Text="Your requirements" />
<rad:RadMenuItem Text="Short" />
<rad:RadMenuItem Text="Longer " />
</Items>
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


Vertically align the text of the root menu items with horizontal flow

Telerik RadMenu v4.4 Send comments on this topic.
Vertically align the text of the root menu items with horizontal flow
Controlling the visual appearance > How to > Vertically align the text of the root menu items with horizontal flow

Glossary Item Box

Vertical alignment of the text of the menu items is a bit tricky with Telerik RadMenu v4.0. We differentiate for FireFox and IE by setting specific attributes that affect the appearance of the menu for each browser. Also, we restrict these settings to the root group only since the flow of the child groups is vertical.

The alignment is achieved through the CSS classes of the skin:

Copy Code
.RadMenu_MySkin .link
{
/* ... */
/* firefox */
vertical-align:middle;
display:table-cell !important;

/* IE */
_padding-top:expression((this.offsetHeight - this.firstChild.offsetHeight) / 2 + "px");
}

.RadMenu_MySkin .group .link
{
/* Negate for second level or higher*/
display:block !important;
_padding-top:0;
}

© 2002-2008 Telerik. All Rights Reserved.


Right-aligning the menu within a container (div, panel, etc...)

Telerik RadMenu v4.4 Send comments on this topic.
Right-aligning the menu within a container (div, panel, etc...)
Controlling the visual appearance > How to > Right-aligning the menu within a container (div, panel, etc...)

Glossary Item Box

By default, Telerik RadMenu will align to the left if placed in a container such as a div or a panel. This behavior can be changed so that Telerik RadMenu aligns to the right simply by setting the float attribute of the RadMenu css class.

Find the RadMenu_[MySkin] class in the css file of the skin and modify it like this:

Copy Code
.RadMenu_[MySkin]
{
background: #bedab4;
float:right !important;
}

© 2002-2008 Telerik. All Rights Reserved.


Apply filter transitions to the menu

Telerik RadMenu v4.4 Send comments on this topic.
Apply filter transitions to the menu
Controlling the visual appearance > How to > Apply filter transitions to the menu

Glossary Item Box

To apply filter transitions to the menu, you can use the following code:

Copy Code
<rad:radmenu
style="position:absolute"
id="RadMenu1"
runat="server"
Skin="CssBlue"
OnClientItemOpen="ApplyEffect">

<script type="text/javascript">
function ApplyEffect(sender, args)
{
// Apply for Internet Explorer only
if (!args.Item.ChildItemList.filters) return;

args.Item.ChildItemList.style.filter = "progid:DXImageTransform.Microsoft.CheckerBoard()";

args.Item.ChildItemList.style.visibility = "hidden";

args.Item.ChildItemList.filters[0].Apply();
args.Item.ChildItemList.filters[0].Play();

args.Item.ChildItemList.style.visibility = "visible";
}
</script>

© 2002-2008 Telerik. All Rights Reserved.


Align the menu to the center of the page

Telerik RadMenu v4.4 Send comments on this topic.
Align the menu to the center of the page
Controlling the visual appearance > How to > Align the menu to the center of the page

Glossary Item Box

The menu can be center aligned with either a div or a table:

  1. Menu aligned within a div with fixed width (standards compliant mode only):
    Copy Code
    <div style="width:228px;margin:0 auto;">
    <rad:radmenu id="RadMenu1" runat="server" Skin="Outlook">
    <Items>
    * * *
    </Items>
    </rad:radmenu>
    </    div>
  2. Menu aligned with a table:
    Copy Code
    <table align="center">
    <tr>
    <td>
    <rad:RadMenu ID="RadMenu2" runat="server" Skin="Outlook">
    <items> </items>
    </rad:RadMenu>
    </td>
    </tr>
    </    table>

© 2002-2008 Telerik. All Rights Reserved.


Avoid wrapping of root menu items

Telerik RadMenu v4.4 Send comments on this topic.
Avoid wrapping of root menu items
Controlling the visual appearance > How to > Avoid wrapping of root menu items

Glossary Item Box

This article shows how to force the root menu items to remain on a single line regardless of their number. If the length of the root group is larger than the width of the page, a scrollbar will be created to accommodate the desired behavior (no wrapping of the items).

Due to the changed rendering mechanism, the menu does not stretch its container. However, there is an easy way to do this - call this script at the end of the page. The best place is just before the closing form tag:

Copy Code
<script type="text/javascript">
var myMenu = <%= RadMenu1.ClientID %>; // Obtain the client-side object.
myMenu.FixListWidth(myMenu);
</script>

If the menu is inside a table tag you should use the following code:

Copy Code
<script type="text/javascript">
window.onload = function ()
{
var myMenu = <%= RadMenu1.ClientID %>; // Obtain the client-side object.
myMenu.FixListWidth(myMenu);
}
</script>

Or, you can achieve the desired functionality with a single line in code-behind:

C# Copy Code
Page.ClientScript.RegisterStartupScript(Page.GetType(),
"menu", String.Format("{0}.FixListWidth({0});", RadMenu1.ClientID), true);
VB.NET Copy Code
Page.ClientScript.RegisterStartupScript(Page.GetType,
"Menu", String.Format("{0}.FixListWidth({0});", RadMenu1.ClientID), True)

© 2002-2008 Telerik. All Rights Reserved.


Remove system border around a focused item

Telerik RadMenu v4.4 Send comments on this topic.
Remove system border around a focused item
Controlling the visual appearance > How to > Remove system border around a focused item

Glossary Item Box

If a RadMenu item is focused under IE 6 or Firefox browser, it will have a system border around it:

focused menu item with border

This article shows how to remove the border around the focused item so that it looks like this:

menu item with no border

Solution for IE 6

Copy Code
<script type="text/javascript">

function RemoveFocus(sender)
{
var menu = sender;
for (var i=0; i<menu.AllItems.length; i++)
{
menu.AllItems[i].LinkElement.hideFocus = true;
}
}

</script>

<rad:RadMenu ID="RadMenu1" OnClientLoad="RemoveFocus" runat="server">

Solution for Firefox

Set outline:none for the focused class in the skin's styles.css file:

Copy Code
.RadMenu_[SkinName] .focused
{
...
outline: none;
}
You can combine both methods for cross-browser support.

© 2002-2008 Telerik. All Rights Reserved.


My CSS rule does not apply
See Also
Controlling the visual appearance > Trouble shooting > My CSS rule does not apply

Glossary Item Box

My CSS rule does not apply

Most probably there is a more concrete CSS rule (usually defined in the skin) which overrides your settings. Let's assume you have defined a custom CSS class and you want to apply it to a specific menu item:

Copy Code
<style type="text/css">
.MyItem
{
color:red;
}
</style>

<rad:RadMenu runat="server" id="RadMenu1" Skin="CssBlue">
<Items>
<rad:RadMenuItem Text="Item 1" CssClass="MyItem" />
</Items>
<rad:RadMenu>
The foreground color of that menu item won't change. There is a more concrete CSS rule in the skin which overrides the "color" CSS property:
Copy Code
.RadMenu_CssBlue .link
{
text-decoration:none;
color: black;
line-height: 20px;
border-bottom: 2px solid #a7cfe8;
border-top: 3px solid #a7cfe8;
}
To make your CSS setting apply you can use one of the following techniques:

1. Make your CSS rule more concrete than the one from the skin:

Copy Code
.RadMenu_CssBlue .rootGroup .MyItem
{
color:red;
}

2. Use the "!important" modifier to force your setting:

Copy Code
.MyItem
{
color:red !important;
}

See Also

Trouble shooting
Image flickering

© 2002-2008 Telerik. All Rights Reserved.


The skin does not apply

Telerik RadMenu v4.4 Send comments on this topic.
The skin does not apply
See Also
Controlling the visual appearance > Trouble shooting > The skin does not apply

Glossary Item Box

Symptoms

The menu visual settings do not apply:

Solution

Check for the following

  1. Have you correctly set the Skin property? Keep in mind that Telerik RadMenu skins are case-sensitive. If you have set the Skin property to "None" no skin will be automatically applied.
  2. Verify the folder of the skin exists. All skins by default are located in ~/RadControls/Menu/Skins.
  3. Setting the SkinsPath property to invalid location would also cause similar problems.
  4. Verify the existence of the "styles.css" file within your skin folder e.g. ~/RadControls/Menu/Skins/MySkin/styles.css
  5. Check if the CSS rules from the skin are correctly prefixed with .RadMenu_[SkinName] e.g .RadMenu_MySkin
  6. If you have not set the Skin property and use ASP.NET 2 check if the web resource handler is properly configured. More info is available here.
  7. See the topic on How to create menu in user control with set OutputCache
  8. Check the doctype of the page. If you are using a case sensitive doctype, make sure that the casing of the skin value and the css styles is the same. For example, if you set Skin=TelerikCom and your css classes are actually RadMenu_telerikCom, for case-sensitive doctypes the skin will not apply. It will, however, apply correctly in quirks mode.
    According to HTML 4.0, the values of CLASS and ID attributes are case-sensitive. For more information see this msdn article.

See Also

The control renders as bullet list / Error: 'RadMenu' is undefined

© 2002-2008 Telerik. All Rights Reserved.


The control renders as bullet list / Error: 'RadMenu' is undefined

Telerik RadMenu v4.4 Send comments on this topic.
The control renders as bullet list / Error: 'RadMenu' is undefined
See Also
Controlling the visual appearance > Trouble shooting > The control renders as bullet list / Error: 'RadMenu' is undefined

Glossary Item Box

Symptoms

The following are two different problems which have the same solution:

  • Telerik RadMenu is rendered as bullet list (also known as unordered list represented by the UL HTML tag). If for some reason the base CSS file of Telerik RadMenu is not loaded your menu would be displayed as a regular unordered list.
  • On page load you get Error: 'RadMenu' is undefined, where RadMenu is the client ID of the menu.

menu undefined error

Solution

If you are using ASP.NET 2.0 that base style sheet file is served as a web resource. If the web resource handler - webresource.axd - is not properly registered the base css file will not be served to the client. Please try the following:

  1. Open the IIS management snap-in (e.g. run inetmgr.exe)
  2. Right-click your website and choose properties
  3. Go to the "Home Directory" tab and click the "Configuration" button
  4. A dialog should pop out and you would see the mappings listbox
  5. Find the entry for the ".axd" extension and edit it by clicking the "Edit" button
  6. In the new dialog uncheck the "Verify if file exist" check box if it is checked.

For the problem when you get Error: 'RadMenu' is undefined you may try an alternative solution and set the UseEmbeddedScripts property to false. This forces the menu not to use embedded web resources but fetch them from the RadConrols folder of the application.

Copy Code
<rad:RadMenu ID="RadMenu1" UseEmbeddedScripts="False" runat="server">

See Also

The skin does not apply
JavaScript errors - RadMenu is undefined
Create menu in user control with set OutputCache

© 2002-2008 Telerik. All Rights Reserved.


Use DataBindings to create a hierarchical menu

Telerik RadMenu v4.4 Send comments on this topic.
Use DataBindings to create a hierarchical menu
See Also
Example scenarios (How to) > Use DataBindings to create a hierarchical menu

Glossary Item Box

Goal: Bind the menu to a flat database creating a hierarchical menu.

A secondary goal is to work exclusively within the design surface of Visual Studio.

To achieve the goals, this tutorial will walk you through the following steps:

  1. Telerik RadMenu can bind to flat data sources such as Access tables. Add an Access table to your project.
  2. Configure the data source.
  3. Bind the menu to the Access data source through the DataSourceID property of the menu.
  4. Create the menu hierarchy by binding the DataFieldID and DataFieldParentID properties of the menu.
  5. Use the DataBindings collection to populate the menu items with data.

This tutorial assumes that you:

  • are using Visual Studio 2005
  • have set up a project called DataBindings
  • have added the RadControls folder (with its Menu subfolder)
  • have removed from the Visual Studio Toolbox previous versions (if any) of Telerik RadMenu
  • have added Telerik RadMenu to the Visual Studio Toolbox

Add an Access database to the project

The only requirement is for the Access data source to have columns that will populate the ID and ParentID properties of the menu. (The columns can have any names, not necessarily ID and ParentID) The parent ID for all root items should be null (nothing).

Below is a screenshot of the menu1.mdb Access table used in this tutorial. The most important columns are ID and ParentID - these will later be bound to the respective menu properties to provide the hierarchical structure of the menu:

Pic. 1

The Access table used in this tutorial

It is not necessary for the names of the columns and the properties to be identical.
  1. Copy the Access database to the root of your project.
  2. Drag an instance of Telerik RadMenu from the Toolbox to the design surface.
  3. Likewise, drag an instance of the AccessDataSource control. (Pic. 2)
Pic. 2
The AccessDataSource control

Configure the data source

Next, you need to configure the newly added data source as shown in Pic. 3 and Pic. 4:
Pic. 3
Data source configuration
  1. Click the AccessDataSource smart tag.
  2. Click Configure Data Source.
  3. In the Configure Data Source dialog, click Browse. Select the newly added data source and then click OK.
    The name and path appear under Microsoft Access data file.
  4. Click Next.
    Pic. 4
    The second screen of the configuration settings
  5. On the second screen of the wizard, select Specify columns from a table or view and from the drop-down, select Table 1.
  6. Select all columns (*).
  7. Go to the next screen.
  8. Optionally, you can click Test Query to check the database connection. When ready, click Finish.

Bind the menu to the data source

You can bind the menu in any of the following two ways:
  • You can use the menu smart tag, as shown in Pic. 5:
Pic. 5
Select a data source using the smart tag
  1. Expand the Telerik RadMenu smart tag.
  2. Under Choose data source, select the ID of the Access data source.
  • Alternatively, you can set the DataSourceID from the Properties window of the menu, as shown in Pic. 6.
Pic. 6
Setting the DataSourceID property

Milestone

If you build your project at this stage, the menu will appear similar to the one shown in Pic. 7 below:
Pic. 7
The hierarchy is not set and the menu is not populated
  • The menu is still not populated with data.
  • The hierarchy is not set.

Create the menu hierarchy

Simply set the DataFieldID and DataFieldParentID properties as shown in Pic. 8:
Pic. 8
Setting the DataFieldID and DataFieldParentID properties
If you build the project now, the menu will look similar to the one shown in Pic. 9 below:
Pic. 9
The hierarchy is set but still the menu is not populated

Populate the menu items with data

You need to use the MenuItemBinding Collection Editor window. You can access the editor in either of the following ways:
  • Right-click the menu and select Edit Menuitem Databindings.
  • Click the Edit Menuitem Databindings shortcut at the bottom of the Properties window of the menu.
  • In the Properties window fo the menu, click the button in the row for the DataBindings property (as shown in Pic. 10 below).
Pic. 10
The DataBindings collection in the Properties window of the menu
The MenuItemBinding Collection Editor window opens. Folow the instructions shown in Pic. 11:
Pic. 11
The MenuItemBinding Collection Editor window
  1. Add a data member to the collection.
  2. Set the TextField and ToolTipField properties as illustrated.
  3. Click OK.
If you build your project now, the menu will look similar to the one shown in Pic. 12:
Pic. 12
The menu items are populated with text and tool tips.
Thus our initial goal is achieved.

New goal: implement different binding logic for each level of hierarchy

Our menu has three levels of items. So far we have bound all levels using the same logic: the Text property of each item is populated from the Text column, whereas the ToolTip property takes its value from the Tooltip column. To do so, we used the TextField and ToolTipField properties of the DataBindings collection.
Our new goal is to:
  • populate the text of all second level items from the Text2 column of the Access table;
  • use the same tooltip for all second level items;
  • populate the text of all third level items from the Tooltip column.

To achieve our new goal, we need to add more data members to the DataBindings collection and set different depth for each new data member.

Add a data member for second-level items

As shown above, open the MenuItemBinding Collection Editor window and add a new data member.

Set the following properties:

  • Depth = "1", to declare that this data member applies to second-level items;
  • TextField = "Text2", to bind the second-level items to the Text2 column;
  • ToolTip = "Custom tool tip here", to make each second-level item appear with the "Custom tool tip here" string as a tool tip.

Text vs TextField, Value vs ValueField, etc.
All properties ending with the suffix -Field can be databound to take their values from a corresponding field in the data source. Properties not ending with -Field are static: all MenuItem objects to which the MenuItemBinding object is applied share the same value.

For instance, if your database contains a column named Text and you set TextField="Text", the Text property of all menu items will take its value from the Text column in the database. Alternatively, if you set Text="Text", all your menu items will take the static string "Text" as the value of their Text property.

If you build your project at this stage, you will notice how all second-level items have taken their values from the Text2 column in the database (Pic. 13).
Pic. 13
The second level is different from before

Add a data member for third-level items

Set the following properties:

  • Depth = "2", to declare that this data member applies to third-level items;
  • TextField = "Tooltip", to take the text of all third-level items from the Tooltip column;

Leave the ToolTipField and ToolTip properties blank. Third-level items will not have tool tips.

The final result should look similar to the one shown in Pic. 14 below:

Pic. 14

The third level now has its own binding logic

See Also

Databindings online example
Data Bindings

© 2002-2008 Telerik. All Rights Reserved.


Databinding with Custom Attributes

Telerik RadMenu v4.4 Send comments on this topic.
Databinding with Custom Attributes
See Also
Example scenarios (How to) > Databinding with Custom Attributes

Glossary Item Box

When binding the Telerik RadMenu to data, custom attributes can be set in the ItemDataBound event.

Here is an example:

ASPX Copy Code
<rad:RadMenu
ID="RadMenu1"
runat="server"
OnItemDataBound="RadMenu1_ItemDataBound" >
</rad:RadMenu>
C# Copy Code
protected void Page_Load(object sender, EventArgs e)
{
//dynamically crate a table to populate the menu
DataTable table1 = new DataTable();

table1.Columns.Add("ID");
table1.Columns.Add("ParentID");
table1.Columns.Add("Roles"); // the column for the custom attributes
table1.Columns.Add("Text");

table1.Rows.Add(new string[] { "1", null, "1", "Politics" });
table1.Rows.Add(new string[] { "2", null, "1", "Sports" });
table1.Rows.Add(new string[] { "3", null, "3", "Events" });
table1.Rows.Add(new string[] { "4", "1", "4", "CNN" });
table1.Rows.Add(new string[] { "5", "1", "5", "NBC" });
table1.Rows.Add(new string[] { "6", "1", "6", "ABC" });
table1.Rows.Add(new string[] { "7", "2", "7", "US Sports" });
table1.Rows.Add(new string[] { "8", "2", "2", "European Sports" });
table1.Rows.Add(new string[] { "9", "7", "4", "Baseball" });
table1.Rows.Add(new string[] { "10", "7", "3", "Football" });
table1.Rows.Add(new string[] { "11", "7", "2", "Basketball" });
table1.Rows.Add(new string[] { "12", "8", "4", "Soccer" });
table1.Rows.Add(new string[] { "14", "3", "5", "Oscar Awards" });
table1.Rows.Add(new string[] { "15", "3", "2", "MTV Movie Awards" });

RadMenu1.DataSource = table1;
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataTextField = "Text";
RadMenu1.DataBind();

}

protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
{
DataRowView dataRow = (DataRowView)e.Item.DataItem;
e.Item.Attributes["Roles"] = dataRow["Roles"].ToString();

e.Item.ToolTip = e.Item.Attributes["Roles"];
//we set the Tooltip just for testing purposes
}
VB.NET Copy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim table1 As New DataTable()

table1.Columns.Add("ID")
table1.Columns.Add("ParentID")
table1.Columns.Add("Roles") ' the column for the custom attributes
table1.Columns.Add("Text")

table1.Rows.Add(New String() {"1", Nothing, "1", "Politics"})
table1.Rows.Add(New String() {"2", Nothing, "1", "Sports"})
table1.Rows.Add(New String() {"3", Nothing, "3", "Events"})
table1.Rows.Add(New String() {"4", "1", "4", "CNN"})
table1.Rows.Add(New String() {"5", "1", "5", "NBC"})
table1.Rows.Add(New String() {"6", "1", "6", "ABC"})
table1.Rows.Add(New String() {"7", "2", "7", "US Sports"})
table1.Rows.Add(New String() {"8", "2", "2", "European Sports"})
table1.Rows.Add(New String() {"9", "7", "4", "Baseball"})
table1.Rows.Add(New String() {"10", "7", "3", "Football"})
table1.Rows.Add(New String() {"11", "7", "2", "Basketball"})
table1.Rows.Add(New String() {"12", "8", "4", "Soccer"})
table1.Rows.Add(New String() {"14", "3", "5", "Oscar Awards"})
table1.Rows.Add(New String() {"15", "3", "2", "MTV Movie Awards"})

RadMenu1.DataSource = table1
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataTextField = "Text"
RadMenu1.DataBind()
End Sub

Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs) Handles RadMenu1.ItemDataBound
Dim dataRow As DataRowView = CType(e.Item.DataItem, DataRowView)
e.Item.Attributes("Roles") = dataRow("Roles").ToString()
e.Item.ToolTip = e.Item.Attributes("Roles")
'we set the Tooltip just for testing purposes
End Sub

See Also

Custom Attributes online example
Hierarchical Data Binding example

Custom Attributes
Overview

Defining the Menu Structure
Overview and types of data sources

© 2002-2008 Telerik. All Rights Reserved.


Create menu in user control with set OutputCache

Telerik RadMenu v4.4 Send comments on this topic.
Create menu in user control with set OutputCache
See Also
Example scenarios (How to) > Create menu in user control with set OutputCache

Glossary Item Box

You can set OutputCache only for the menu control simply by putting the Telerik RadMenu in a user control. For example:

ASCX Copy Code
<%@ OutputCache Duration="60" VaryByParam="None" %>
<rad:RadMenu ID="RadMenu1" Skin="Outlook" runat="server">
<Items>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

However, if the aspx page that contains this user control does a postback, the menu will loose its styles and appear as a bullet list of hyperlinks:

Menu without styles

The reason for this is that when the aspx page postbacks, it receives the cached output which doesn't contain the path for the css styles of the menu.

To fix the problem, you need to manually register the menu styles in the aspx:

Copy Code
<head runat="server">
<link type="text/css" href="RadControls/Menu/Scripts/4_1_3/menu.css" rel="stylesheet" />
<link type="text/css" href="RadControls/Menu/Skins/Outlook/styles.css" rel="stylesheet" />
</head>

A menu with Outlook skin will use the following css files:

menu styles location

See Also

The control renders as bullet list / Error: 'RadMenu' is undefined

© 2002-2008 Telerik. All Rights Reserved.


Hide and show the menu on the client

Telerik RadMenu v4.4 Send comments on this topic.
Hide and show the menu on the client
Example scenarios (How to) > Hide and show the menu on the client

Glossary Item Box

To hide and show the menu on the client, we will take advantage of the DomElement property of the menu. Here is an example:

Copy Code
<!-- menu -->
<rad:RadMenu ID="RadMenu1" runat="server" >
. . .
</rad:RadMenuItem>

<!-- show and hide buttons -->
<input id="Button1" type="button" onclick="hidemenu()" value="hide menu" />
<input id="Button2" type="button" onclick="showmenu()" value="show menu" />

<!-- java script functions -->
<script type="text/javascript">
var menu = <%= RadMenu1.ClientID %>

function hidemenu()
{
menu.DomElement.style.display = "none";
}

function showmenu()
{
menu.DomElement.style.display = "";
}
</script>

The above code hides the menu when the user clicks on the hide menu button and shows the menu when the user clicks on the show menu button.

If the menu is context (IsContext=true), you can use the Show and Hide methods of the menu to achieve the same functionality. Note, that these methods will work only for context menus.

For more information on DomElement property and the Show and Hide methods of the menu, please view the help topic on RadMenu Client Object.

© 2002-2008 Telerik. All Rights Reserved.


Telerik RadMenu Client-Side API

Telerik RadMenu v4.4 Send comments on this topic.
Telerik RadMenu Client-Side API
See Also
Telerik RadMenu client-side > Telerik RadMenu Client-Side API

Glossary Item Box

Telerik RadMenu provides a flexible client-side API. You can easily interact with the menu in the browser using the menu client-side object.

1. Getting the RadMenu client-side object

RadMenu creates a client-side object with the ClientID of the menu. You can obtain the reference using the following JavaScript code:

Copy Code
var menu = <%= RadMenu1.ClientID %>;

2. Getting the instance of a particular RadMenuItem

Once you get the client-side object of RadMenu, you can use the FindItemByText() method to get the instance of a particular item. Example:

Copy Code
var menu = <%= RadMenu1.ClientID %>;
var item = menu.FindItemByText(text);

3. Calling a client-side method

When you get the instance of a particular item, you can call a client-side method to perform a task. Consider the following examples:

  • Open()
Copy Code
function OpenItem()
{
var menu = <%= RadMenu1.ClientID %>;
var item = menu.FindItemByText(text);
if (item)
{
item.Open();
}
else
{
alert("Item with text '" + text + "' not found.");
}
}

  • Close()
Copy Code
function CloseItem()
{
var menu = <%= RadMenu1.ClientID %>;
var item = menu.FindItemByText(text);
if (item)
{
item.Close();
}
else
{
alert("Item with text '" + text + "' not found.");
}
}

  • Disable()
Copy Code
function DisableItem()
{
var menu = <%= RadMenu2.ClientID %>;
var item = menu.FindItemByText(text);
if (item)
{
item.Disable();
}
else
{
alert("Item with text '" + text + "' not found.");
}
}

  • Enable()
Copy Code
function EnableAll()
{
var menu = <%= RadMenu2.ClientID %>;
for (var i = 0; i < menu.AllItems.length; i++)
{
menu.AllItems[i].Enable();
}
}

The code block <%= ... %> needs to be placed inside the BODY element of the page. See Atlas support for details.

See Also

Client-Side Events online example
Client-Side API
The RadMenu client object
The RadMenuItem client object
Enumerate the menu items
Client-side event handling

© 2002-2008 Telerik. All Rights Reserved.


Find RadMenu client object if it is nested as a template in another control

Telerik RadMenu v4.4 Send comments on this topic.
Find RadMenu client object if it is nested as a template in another control
Telerik RadMenu client-side > Find RadMenu client object if it is nested as a template in another control

Glossary Item Box

This is a universal method to find the RadMenu client object regardless where it is nested on the page. This method comes in handy if RadMenu is nested in another control:

RadMenu must be rendered only once. For example, you can use this approach if RadMenu is nested in a toolbar template button. However, if RadMenu is nested in a grid with more than one row, the method fails since there will be multiple instances the rendered menu for each grid row.
Copy Code
<script type="text/javascript">

var menu1;

function StoreMenuClientObject(sender)
{
menu1 = sender;
}

function UtilizeMenuClientObject()
{
alert(menu1.ID);
}
</script>

<AnyControl>
<Template>
<rad:RadMenu ID="RadMenu1" OnClientLoad="StoreMenuClientObject" runat="server">
</rad:RadMenu>
</Template>
</AnyControl>

<input id="Button1" type="button" onclick="UtilizeMenuClientObject()" value="button" />

The above approach is possible due to the OnClientLoad event of RadMenu.

The StoreMenuClientObject function must be declared before the RadMenu definition.

© 2002-2008 Telerik. All Rights Reserved.


The RadMenu client object

Telerik RadMenu v4.4 Send comments on this topic.
The RadMenu client object
See Also
Telerik RadMenu client-side > The RadMenu client object

Glossary Item Box

Methods

Name | Parameters | Return Type | Description
Disable | none | none | Disables all items in the menu. Clicking on any item has no effect, child items cannot be opened.
Enable | none | none | Enables all items in the menu.
Close | none | none | Closes all opened items
Show | (browserEvent) | none | Shows a context menu at the coordinates specified in the browser event.
ShowAt | (int x, int y) | none | Shows a context menu at the specified coordinates.
FindItemByUrl | (string URL) | RadMenuItem | Returns the first RadMenuItem object whose NavigateUrl property is equal to the passed parameter. Note: The NavigateUrl property is transformed to absolute URL on the client-side, e.g. "default.aspx" is turned into: http://mydomain.com/default.aspx.
SetContextElementID | (string elementID) | none | Binds a context menu to the html element with the specified ID. The context menu will open only when right-clicking on the element.
SetAttribute | (sting attributeName, string value) | none | Sets the value of the specified custom attribute.
GetAttribute | (sting attributeName) | string | Returns the value of the specified custom attribute. If there is no such attribute, null is returned.
FindItemByValue | (string value) | RadMenuItem | Returns the first RadMenuItem object whose Value property is equal to the passed parameter.
FindItemByText | (string text) | RadMenuItem | Returns the first RadMenuItem object whose Text property is equal to the passed parameter.
FindItemById | (string text) | RadMenuItem | Returns the first RadMenuItem object whose ID property is equal to the passed parameter.
AttachEvent | (string eventName, mixed eventHandler) | none | Attaches an eventHandler to the specified eventName. For more information, check Client-side API in this help.
DetachEvent | (string eventName, mixed eventHandler) | Boolean | Detaches an eventHandler from the specified eventName. Returns "True" if an eventHandler hooked to the specified eventName is found and detached, false otherwise. For more information, check Client-side API in this help.
MouseEventX | ( browserEvent) | integer | Returns the x-coordinate of the current browser event.
MouseEventY | ( browserEvent) | integer | Returns the y-coordinate of the current browser event.
Hide | none | none | Hides the menu if it is context (IsContext="True")
EnableEvents | none | none | Enables the control client-side event emitting. Events are enabled by default.
Focus | none | none | Brings the focus to the menu so that it can be controlled via the keyboard.
DisableEvents | none | none | Disables the control client-side event emitting.

Properties

Name

 Type Description
ID String

Gets the ClientID of the control.

Example Copy Code
<script type="text/javascript">
var menu1 = <%=RadMenu1.ClientID %>
function showMenu()
{
alert(menu1.ID);
}
showMenu();
</script>
DomElement | HTML Element | Gets the root DOM element of the control.
Items Array

Gets the root level items.

Example Copy Code
<script type="text/javascript">
var menu1 = <%=RadMenu1.ClientID %>
function showRootItems()
{
for (var i=0; i<menu1.Items.length; i++)
{
alert(menu1.Items[i].Text);
}
}
showRootItems();
</script>
Enabled | boolean | True if the menu is enabled. To enable a menu, use the Enable() method.
AllItems Array

Gets a linear collection of all items. This includes all root and child items in the menu.

Example Copy Code
<script type="text/javascript">
var menu1 = <%=RadMenu1.ClientID %>
function showAllItems()
{
for (var i=0; i<menu1.AllItems.length; i++)
{
alert(menu1.AllItems[i].Text);
}
}
showAllItems();
</script>
OpenedItem | RadMenuItem | Gets the opened root level item. If no item is opened at the root level returns null.
FocusedItem | RadMenuItem | Gets the focused root level item. Null if no item is selected.

Events

Name Event Handler Parameters Description
OnClientLoad (RadMenu sender)

The client-side event handler is called after the menu is fully initialized on the client.

For more details, see the OnClientLoad topic.

OnClientMouseOver (RadMenu sender, Object eventArgs)

The client-side event handler is called when the mouse moves over a menu item. eventArgs exposes one property, Item: the instance of the menu item.

For more details, see the OnClientMouseOver topic.

OnClientMouseOut (RadMenu sender, Object eventArgs)

The client-side event handler is called when the mouse moves out of a menu item. eventArgs exposes one property, Item: the instance of the menu item.

For more details, see the OnClientMouseOut topic.

OnClientItemOpen (RadMenu sender, Object eventArgs)

The client-side event handler is called when a group of child items opens. eventArgs exposes one property, Item: the instance of the menu item.

For more details, see the OnClientItemOpen topic.

OnClientItemFocus (RadMenu sender, Object eventArgs)

If specified, the OnClientItemFocus client-side event handler is called when a menu item is selected using either the keyboard (the [TAB] or arrow keys) or mouse click. eventArgs exposes one property, Item: the instance of the menu item.

For more details, see the OnClientItemFocus topic.

OnClientItemBlur (RadMenu sender, Object eventArgs)

The client-side event handler is called when a menu item loses focus as a result of the user pressing a key or mouse click. eventArgs exposes one property, Item: the instance of the menu item.

For more details, see the OnClientItemBlur topic.

OnClientItemClicking (RadMenu sender, Object eventArgs)

The client-side event handler is called before a menu item is clicked upon. eventArgs exposes one property, Item: the instance of the menu item. (The event is similar to OnClientItemFocus but fires only on mouse click.)

Can be cancelled: return False from the event handler.

For more details, see the OnClientItemClicking topic.

OnClientItemClicked (RadMenu sender, Object eventArgs)

The client-side event handler is called after a menu item is clicked upon. eventArgs exposes one property, Item: the instance of the menu item. (The event is similar to OnClientItemFocus but fires only on mouse click.)

For more details, see the OnClientItemClicked topic.

OnClientContextShowing (RadMenu sender)

This client-side event handler is called before the context menu is shown on the client.

For more details, see the OnClientContextShowing topic.

OnClientContextShown (RadMenu sender)

This client-side event handler is called after the context menu is shown on the client.

For more details, see the OnClientContextShown topic.

OnClientContextHidden (RadMenu sender)

This client-side event handler is called after the context menu is hidden on the client.

For more details, see the OnClientContextHidden topic.

For more details on handling client events, review the client events section.

See Also

Telerik RadMenu Client-Side API
The RadMenuItem client object
Enumerate the menu items
Client-side event handling

© 2002-2008 Telerik. All Rights Reserved.


The RadMenuItem client object

Telerik RadMenu v4.4 Send comments on this topic.
The RadMenuItem client object
See Also
Telerik RadMenu client-side > The RadMenuItem client object

Glossary Item Box

Methods

Name | Parameters | Return Type | Description
Disable none none

Disables the item.

Example: Copy Code
var menuItem = RadMenu1.FindItemByText("Paris");
menuItem.Disable();
Enable none none

If the item is disabled, enables the item.

Example: Copy Code
var menuItem = RadMenu1.FindItemByText("Paris");
menuItem.Enable();
Focus none none

Focuses the item.

Example: Copy Code
var menuItem = RadMenu1.FindItemByText("Paris");
menuItem.Focus();
Blur none none

Removes the focus from the item.

Example: Copy Code
var menuItem = RadMenu1.FindItemByText("Paris");
menuItem.Blur();
FocusPreviousItem none none

Moves the focus back to the previous item.

FocusNextItem none none

Moves the focus forward to the next item.

FocusFirstChild none none

Moves the focus over to the first child of the item.

FocusLastChild none none

Moves the focus over to the last child of the item.

GetNextItem | none | RadMenuItem | Returns the next sibling of the item. If the item is last, returns null.
GetPreviousItem | none | RadMenuItem | Returns the previous sibling of the item. If the item is firs, returns null.
GetAttribute | (sting attributeName) | string | Returns the value of the specified custom attribute. If there is no such attribute, null is returned.
SetAttribute | (sting attributeName, string value) | none | Sets the value of the specified custom attribute.
SetImageOverUrl | (string imageUrl) | none | Sets the URL of the image displayed when the mouse if over the item.
SetImageUrl | (string imageUrl) | none | Sets the URL of the image.
Open none none

Expands the item and reveals its children, if any.

Close none none

Collapses the item, if expanded.

SetValue | string value | none | Sets the value of the item.
SetText | string text | none | Sets the text of the item.
Show | none | none | Makes the item visible.
Hide | none | none | Makes the item invisible.
IsVisible | none | bool | Returns true if the items is visible or false if the item is invisible.

Properties

Name | Type | Description
ID | String | Gets the ClientID of the item.
DomElement | HTML Element | Gets the root DOM element of the item (LI).
Items | Array | Gets the child items of the current item.
FocusedItem | RadMenuItem | Gets the focused child item. Null if no child item is focused.
OpenedItem | RadMenuItem | Gets the opened child item. Null if no child item is opened.
IsSeparator | boolean | If the item is separator (severside property IsSeparator = true)
Parent | RadMenuItem / RadMenu | Gets an instance of the parent object: either RadMenuItem, or RadMenu if the item is a root item.
LinkElement | HTML Element | Gets the anchor DOM element of the item (A).
Level | Integer | Gets the level of the item. Root level items are first level.
ImageElement | HTML Element | Gets the image DOM element of the item. If the server side ImageUrl property is not set, will return null.
Menu | RadMenu | Gets an instance of the menu control containing the item.
Enabled | Boolean | Gets the enabled state of the item.
Index | Integer | Gets the zero based index of the item inside the parent Items collection.
GlobalIndex | Integer | Gets the zero based index of the menu item inside the RadMenu.AllItems collection.
Text | String | Gets the text of the item.
TextElement | HTML Element | Gets the text of DOM element of the item (SPAN).
Value | String | Gets the value of the item.
Focused | Boolean | Determines whether the menu item is focused.

See Also

Telerik RadMenu Client-Side API
The RadMenu client object
Enumerate the menu items
Client-side event handling

© 2002-2008 Telerik. All Rights Reserved.


Enumerate the menu items

Telerik RadMenu v4.4 Send comments on this topic.
Enumerate the menu items
See Also
Telerik RadMenu client-side > Enumerate the menu items

Glossary Item Box

You can enumerate all items in the menu instance using the EnumerateAllItems() method. To enumerate only root items, use the Items collection of the menu, or the Items collection of the respective parent item.

Examples:

Enumerate root items Copy Code
<script type="text/javascript">

function EnumerateRootItems()
{
var menu = <%= RadMenu1.ClientID %>;
for (var i=0; i<menu.Items.length; i++)
{
alert(menu.Items[i].Text);
}
}
</script>
Enumerate all items Copy Code
<script type="text/javascript">

function EnumerateAllItems()
{
var menu = <%= RadMenu1.ClientID %>;
for (var i=0; i<menu.AllItems.length; i++)
{
alert(menu.AllItems[i].Text);
}
}
</script>

See Also

Telerik RadMenu Client-Side API

© 2002-2008 Telerik. All Rights Reserved.


Client-side event handling

Telerik RadMenu v4.4 Send comments on this topic.
Client-side event handling
See Also
Telerik RadMenu client-side > Client-side events > Client-side event handling

Glossary Item Box

Much like the event handling exposed by the Document Object Model, the client-side menu object allows both singlecast and multicast event handler binding.

Singlecast event handling

Singlecast event handling is the simplest way to execute user code when an event occurs. It is done by a direct assignment:

Copy Code
<script type="text/javascript">
function OnClientItemFocusHandler()
{
alert("item");
}
RadMenu1.OnClientItemFocus = OnClientItemFocusHandler;
</script>

Multicast event handling

If you want multiple listeners to respond to a certain event, you should use multicast event handling.

The example below demonstrates how to bind multiple event handlers to the OnClientItemFocus event of the menu:

Copy Code
<script type="text/javascript">
function OnClientItemFocusHandler1()
{
alert( "first handler called");
}
function OnClientItemFocusHandler2()
{
alert( "second handler called");
}
RadMenu1.AttachEvent("OnClientItemFocus", OnClientItemFocusHandler1);
RadMenu1.AttachEvent("OnClientItemFocus", OnClientItemFocusHandler2);
</script>

Another advantage of multicast event handlers is the possibility of detaching a certain handler dynamically. You may use the DetachEvent() method of the menu object. DetachEvent() will work only if AttachEvent() is used:

Copy Code
<input id="Button1" onclick="detatch()" type="button" value="button" />
<script type="text/javascript">
RadMenu1.AttachEvent( "OnClientMouseOver", mouseoverhandler);

function detatch()
{
RadMenu1.DetachEvent( "OnClientMouseOver", mouseoverhandler);
}

function mouseoverhandler()
{
alert("1");
}
</script>
The code above will detach the OnClientMouseOver event when the button is clicked.

Formatting event handlers

To conform with the Document Object Model, we have exposed three available formats for event handler definition. These formats are supported both for singlecast and multicast event handling.

Function reference

First you define a function, then you pass a reference to it.

Copy Code
<script type="text/javascript">
function OnClientItemFocusHandler()
{
alert( "first handler called");
}
RadMenu1.OnClientItemFocus = OnClientItemFocusHandler;
</script>

Function name (string)

First you define a function, then you pass its name as a string to the event.

Copy Code
<script type="text/javascript">
function OnClientItemFocusHandler()
{
alert( "first handler called");
}
RadMenu1.OnClientItemFocus = "OnClientItemFocusHandler";
</script>

String containing executable code

Useful for simple scenarios. The string passed is evaluated when the event handler is called.

Copy Code
<script type="text/javascript">
RadMenu1.OnClientItemFocus = "alert('first handler called')";
</script>

Cancelling an event

In general, the events named with an -ing suffix (OnClientItemClicking for instance) can be cancelled if you explicitly return False from a handler.

The example below shows how an item click can be cancelled.

To test whether the event is really being cancelled, you can use the following server-side code:

C# Copy Code
protected void RadMenu1_MenuItemClick(object sender, Telerik.WebControls.MenuEventArgs e)
{
TextBox1.Text = "Postback occured because the event wasn't cancelled.";
}

In case the event is not cancelled, the page will perform postback. If the event is cancelled, the postback will not be performed.

The client-side JavaScript code is as follows:

Copy Code
<script type="text/javascript">
function OnClientItemClickingHandler(sender, EventArgs)
{
alert("You clicked " + EventArgs.Item.Text);
//Remove comments from the line below to disable postback:
//return false;
}
RadMenu1.OnClientItemClicking = "OnClientItemClickingHandler";
</script>

Note that the return false statement is placed inside a comment. You can test whether the event is being cancelled by removing and replacing the comment.

Enabling and disabling events

If you want for some reason to temporarily "mute" the control event emitting (or, respectively, to "unmute" the events again), you may use the DisableEvents() and EnableEvents() methods. While the AttachEvent() and DetachEvent() methods are used to enable or disable a particular event, EnableEvent() and DisableEvent() affect all events at once.

Copy Code
<script type="text/javascript">
function OnClientItemClickingHandler(sender, EventArgs)
{
alert("You clicked " + EventArgs.Item.Text);
}

RadMenu1.DisableEvents();
RadMenu1.OnClientItemClicking = OnClientItemClickingHandler;
</script>
Find examples of this functionality at www.telerik.com.

See Also

Telerik RadMenu Client-Side API
The RadMenu client object
The RadMenuItem client object

© 2002-2008 Telerik. All Rights Reserved.


OnClientLoad

Telerik RadMenu v4.4 Send comments on this topic.
OnClientLoad
See Also
Telerik RadMenu client-side > Client-side events > OnClientLoad

Glossary Item Box

If specified, the OnClienLoad client-side event handler is called after the menu is fully initialized on the client.

A single parameter - the menu client object - is passed to the handler.

This event cannot be cancelled.

Example Copy Code
<script type="text/javascript">
function OnClientLoadHandler(sender)
{
alert(sender.ID);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat= "server"
OnClientLoad= "OnClientLoadHandler">
....
</rad:RadMenu>

See Also

Telerik RadMenu Client-Side API
Client-side event handling

© 2002-2008 Telerik. All Rights Reserved.


OnClientMouseOver

Telerik RadMenu v4.4 Send comments on this topic.
OnClientMouseOver
See Also
Telerik RadMenu client-side > Client-side events > OnClientMouseOver

Glossary Item Box

If specified, the OnClientMouseOver client-side event handler is called when the mouse moves over a menu item. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientMouseOverHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat= "server"
OnClientMouseOver= "OnClientMouseOverHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientMouseOut

© 2002-2008 Telerik. All Rights Reserved.


OnClientMouseOut

Telerik RadMenu v4.4 Send comments on this topic.
OnClientMouseOut
See Also
Telerik RadMenu client-side > Client-side events > OnClientMouseOut

Glossary Item Box

If specified, the OnClientMouseOut client-side event handler is called when the mouse moves out of a menu item. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientMouseOutHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat= "server"
OnClientMouseOut= "OnClientMouseOutHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientMouseOver

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemOpen

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemOpen
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemOpen

Glossary Item Box

If specified, the OnClientItemOpen client-side event handler is called when a group of child items opens. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemOpenHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemOpen="OnClientItemOpenHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
Telerik RadMenu Client-Side API

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemFocus

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemFocus
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemFocus

Glossary Item Box

If specified, the OnClientItemFocus client-side event handler is called when a menu item is selected using either the keyboard (the [TAB] or arrow keys) or by clicking it. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemFocusHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemFocus="OnClientItemFocusHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemBlur

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemBlur

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemBlur
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemBlur

Glossary Item Box

If specified, the OnClientItemBlur client-side event handler is called when a menu item loses focus as a result of the user pressing a key or clicking elsewhere on the page. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemBlurHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemBlur="OnClientItemBlurHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemFocus

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemClicking

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemClicking
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemClicking

Glossary Item Box

This event is similar to OnClientItemFocus but fires only on mouse click.

If specified, the OnClientItemClicking client-side event handler is called before a menu item is clicked upon. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

The OnClientItemClicking event can be cancelled. To do so, return False from the event handler.

Example
Copy Code
<script type="text/javascript">
function OnClientItemClickingHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClicking="OnClientItemClickingHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemClicked
OnClientItemFocus

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemClicked

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemClicked
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemClicked

Glossary Item Box

This event is similar to OnClientItemFocus but fires only on mouse click.

If specified, the OnClientItemClicked client-side event handler is called after a menu item is clicked upon. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemClickedHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClicked="OnClientItemClickedHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemClicking
OnClientItemFocus

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemClose

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemClose
See Also
Telerik RadMenu client-side > Client-side events > OnClientItemClose

Glossary Item Box

If specified, the OnClientItemClose client-side event handler is called before a menu item is closed. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

The OnClientItemClose event can be cancelled. To do so, return False from the event handler.

Example

Copy Code
<script type="text/javascript">
function OnClientItemCloseHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClose="OnClientItemCloseHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemChecked
OnClientItemUnChecking
OnClientItemUnChecked

© 2002-2008 Telerik. All Rights Reserved.


OnClientContextShowing

Telerik RadMenu v4.4 Send comments on this topic.
OnClientContextShowing
Telerik RadMenu client-side > Client-side events > OnClientContextShowing

Glossary Item Box

If specified, the OnClientContextShowing client-side event handler is called before the context menu is shown on the client. One parameter is passed to the handler:

  • sender, the menu client object;

The OnClientContextShowing event can be cancelled. To do so, return False from the event handler.

Example

Copy Code
<script type="text/javascript">
function OnClientContextShowingHandler(sender)
{
alert(sender.ID);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientContextShowing="OnClientContextShowingHandler">
....
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


OnClientContextShown

Telerik RadMenu v4.4 Send comments on this topic.
OnClientContextShown
Telerik RadMenu client-side > Client-side events > OnClientContextShown

Glossary Item Box

If specified, the OnClientContextShown client-side event handler is called after the context menu is shown on the client. One parameter is passed to the handler:

  • sender, the menu client object;

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientContextShownHandler(sender)
{
alert(sender.ID);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientContextShown="OnClientContextShownHandler">
....
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


OnClientContextHidden

Telerik RadMenu v4.4 Send comments on this topic.
OnClientContextHidden
Telerik RadMenu client-side > Client-side events > OnClientContextHidden

Glossary Item Box

If specified, the OnClientContextHidden client-side event handler is called after the context menu is hidden on the client. One parameter is passed to the handler:

  • sender, the menu client object;

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientContextHiddenHandler(sender)
{
alert(sender.ID);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientContextHidden="OnClientContextHiddenHandler">
....
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


Add, remove and disable menu items

Telerik RadMenu v4.4 Send comments on this topic.
Add, remove and disable menu items
See Also
Telerik RadMenu server-side > Add, remove and disable menu items

Glossary Item Box

With Telerik RadMenu it is easy to add, remove or disable items at runtime.

You can get the clicked item from the event argument of the click handler. You can then get its parent item, and then add and remove child items to the Items collection of the item and enable or disable them.

Adding items at runtime is quite simple: just create a new instance of the MenuItem and add it to the corresponding Items collection with the AddItem() method. Similarly, to remove an item, use the Remove() method.

To disable an item, simply set the Enabled boolean property of the menu item to False.

To see the code sample, please, view the online example on Add / Remove / Disable Items

See Also

Add/Remove/Disable Items online example
Server-Side Events online example
Server-side events

© 2002-2008 Telerik. All Rights Reserved.


Server-side events

Telerik RadMenu v4.4 Send comments on this topic.
Server-side events
See Also
Telerik RadMenu server-side > Server-side events

Glossary Item Box

Telerik RadMenu provides three server-side events - ItemClick, ItemCreated and ItemDataBound.

ItemClick

The server-side ItemClick event is fired after a menu postback. The instance of the clicked item is passed to the ItemClick event handler - you can obtain a reference to it using the RadMenuEventArgs.

C# Copy Code
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
{
Telerik.WebControls.RadMenuItem ItemClicked = e.Item;
Response.Write("Server event raised -- you clicked: " + ItemClicked.Text);
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemClick(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs)
Handles RadMenu1.ItemClick
Dim ItemClicked As Telerik.WebControls.RadMenuItem = e.Item
Response.Write("Server event raised -- you clicked: " + ItemClicked.Text)
End Sub

ItemCreated

ItemCreated is fired every time a new item is added to the RadMenu instance. ItemCreated is not related to Data Binding and you cannot retrieve the DataItem of the item in the ItemCreated event handler. ItemCreated is often useful in scenarios where you want to initialize all items- for example setting the ToolTip of each item to be equal to the Text property.

C# Copy Code
protected void RadMenu1_ItemCreated(object sender, RadMenuEventArgs e)
{
Response.Write("This item was just added to the menu: " + e.Item.Text + "<br>");
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs)
Handles RadMenu1.ItemCreated
Response.Write("This item was just added to the menu: " + e.Item.Text + "<br>")
End Sub

The output will be similar to this:

ItemDataBound

ItamDataBound is fired for each item whenever you are binding the Telerik RadMenu (setting a DataSource and calling DataBind() explicitly or using declarative Data Binding through DataSourceID in ASP.NET 2.0). You can retrieve the item being bound using the RadMenuEventArgs. The DataItem associated with the item can be retrieved with e.DataItem property. You need to cast the DataItem to the type of the datasource item you are binding to and then map fields from the DataItem to their respective properties in the RadMenuItem class.

C# Copy Code
private DataTable CreateTestTable()
{
DataTable table = new DataTable();

table.Columns.Add("ID");
table.Columns.Add("ParentID");
table.Columns.Add("Text");

table.Rows.Add(new object[] { "1", null, "Root 1" });
table.Rows.Add(new object[] { "2", null, "Root 2" });
table.Rows.Add(new object[] { "a", 1, "Child 1.1" });
table.Rows.Add(new object[] { "aa", 1, "Child 1.2" });
table.Rows.Add(new object[] { "b", "2", "Child 2.1" });
table.Rows.Add(new object[] { "bb", "2", "Child 2.2" });

return table;
}
protected void Page_Load(object sender, EventArgs e)
{
RadMenu1.DataSource = CreateTestTable();
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataBind();
}

protected void RadMenu1_ItemDataBound(object sender, RadMenuEventArgs e)
{
DataRowView row = (DataRowView)e.Item.DataItem;
e.Item.Text = row["Text"].ToString();
}
VB.NET Copy Code
Private Function CreateTestTable() As DataTable
Dim table As New DataTable()

table.Columns.Add("ID")
table.Columns.Add("ParentID")
table.Columns.Add("Text")

table.Rows.Add(New Object() {"1", Nothing, "Root 1"})
table.Rows.Add(New Object() {"2", Nothing, "Root 2"})
table.Rows.Add(New Object() {"a", 1, "Child 1.1"})
table.Rows.Add(New Object() {"aa", 1, "Child 1.2"})
table.Rows.Add(New Object() {"b", "2", "Child 2.1"})
table.Rows.Add(New Object() {"bb", "2", "Child 2.2"})

Return table
End Function 'CreateTestTable

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RadMenu1.DataSource = CreateTestTable()
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataBind()

End Sub
Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuEventArgs) Handles RadMenu1.ItemDataBound

Dim row As DataRowView = CType(e.Item.DataItem, DataRowView)
e.Item.Text = row("Text").ToString()
End Sub

See Also

Add, remove and disable menu items

© 2002-2008 Telerik. All Rights Reserved.


Image flickering

Telerik RadMenu v4.4 Send comments on this topic.
Image flickering
See Also
Troubleshooting > Image flickering

Glossary Item Box

In most cases, the reason for the flicker is that browser cache is disabled (Tools->Internet Options->Temporary Internet Files->Settings->Checks for new versions ->every visit to the page). The browser requests the background image every time, rather than only once (on page load). The request to the server and the response take some time, hence the flicker effect. If you use a skin which does not utilize background images, you will see that this effect disappears.

Note that this problem is particularly visible in Internet Explorer 6. The image flicker should not appear in other browsers such as FireFox and Internet Explorer 7.

The following blog posts suggest workarounds (configuring your web server):

http://weblogs.asp.net/scottgu/archive/2006/05/29/Eliminating-CSS-Image-Flicker-with-IE6.aspx

http://www.aspnetresources.com/blog/cache_control_extensions.aspx

For a client-side solution you can also try this. Just put the following JavaScript code in the HEAD tag of your page:

Copy Code
<head>
....
<script type="text/javascript">
try {
document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}
</script>
</head>
In addition, please note that the internal VS2005 development server (Cassini) does not use cache and if you run your application through it you will always have the flicker on your pages.

See Also

Customizing the menu Appearance
My CSS rule does not apply

© 2002-2008 Telerik. All Rights Reserved.


Menu items stack over each other under FireFox and IE 7

Telerik RadMenu v4.4 Send comments on this topic.
Menu items stack over each other under FireFox and IE 7
See Also
Troubleshooting > Menu items stack over each other under FireFox and IE 7

Glossary Item Box

Symptoms

The menu items stack over each other:

FireFox and IE 7.0:

Menu items stacked under FF and IE7

The menu looks normal under IE 6:

menu items normal under IE 6
Here is the aspx code which produces the above menu:
Copy Code
<rad:RadMenu runat="server" ID="RadMenu1" Skin="CssBlue">
<Items>
<rad:RadMenuItem Text="Root Item 1" runat="server" Width="20px">
<Items>
<rad:RadMenuItem Text="Child Item 1" runat="server" />
<rad:RadMenuItem Text="Child Item 2" runat="server" >
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root Item 2" Width="20px">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root Item 3" Width="20px">
</rad:RadMenuItem>
</Items>
</rad:RadMenu>

The reason for this problem is that the width is rendered as a css attribute which is handled differently by FireFox and IE 7 browsers.

Solution

Remove the Width or set it to a larger value. If you do not set the Width, the item will automatically take enough space to accommodate its content.

For more information, please see the MSDN KB on Cascading Style Sheet Compatibility in Internet Explorer 7

See Also

The control renders as bullet list / Error: 'RadMenu' is undefined

© 2002-2008 Telerik. All Rights Reserved.


Hide a context Telerik RadMenu when the mouse moves away

Telerik RadMenu v4.4 Send comments on this topic.
Hide a context Telerik RadMenu when the mouse moves away
Troubleshooting > Hide a context Telerik RadMenu when the mouse moves away

Glossary Item Box

This topic shows how to hide a context Telerik RadMenu when mouse moves away.

We will use the window's setInterval( ) and clearInterval( ) methods.The context menu will hide in two seconds after the mouse is moved away. The code is as follows:

Copy Code
<script>
var shouldHide = false;
var timerID;

function OnMouseOver(item)
{
shouldHide = false;
}

function SetHideTimer()
{
shouldHide = false;
timerID = window.setInterval(HideTimer, 2000);
}

function HideTimer()
{
if (shouldHide == false)
{
shouldHide = true;
}
else
{
<%=RadMenu1.ClientID%>.Hide(); //for v4.x
//<%=RadMenu1.ClientID%>.HideMenu(); for v3.x
window.clearInterval(timerID);
}
}
</script>

<asp:label id="Label1" runat="server" oncontextmenu="SetHideTimer()">

oncontextmenu is a built-in java functionality which should be set for the label (server control, image, etc.) tag like shown above.

© 2002-2008 Telerik. All Rights Reserved.


The DataItem property is empty

Telerik RadMenu v4.4 Send comments on this topic.
The DataItem property is empty
Troubleshooting > The DataItem property is empty

Glossary Item Box

The DataItem property is available only during databinding in the ItemDataBound event:

C# Copy Code
protected void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
{
DataRowView dataSourceRow = (DataRowView)e.Item.DataItem;
}
VB.NET Copy Code
Protected Sub RadMenu1_ItemDataBound(sender As Object, e As Telerik.WebControls.RadMenuEventArgs)
Dim dataSourceRow As DataRowView = CType(e.Item.DataItem, DataRowView)
End Sub 'RadMenu1_ItemDataBound

You should not use it elsewhere. You can use the Value property or Custom Attributes instead.

© 2002-2008 Telerik. All Rights Reserved.


JavaScript errors - RadMenu is undefined

Telerik RadMenu v4.4 Send comments on this topic.
JavaScript errors - RadMenu is undefined
See Also
Troubleshooting > JavaScript errors - RadMenu is undefined

Glossary Item Box

Symptoms

Causes and Solutions

Telerik RadMenu cannot find its java script file. The necessary file is fetched either from the WebResource.axd file or from the RadControls folder, depending on the control's settings.

Case 1: UseEmbeddedScripts property of Telerik RadMenu is set to false

In this case Telerik RadMenu will search for its java script file in the RadControls folder:

java script file in RadControls

The following script will be part of the rendered output of the menu:

Copy Code
<div id="RadMenu1" class="radmenu RadMenu_Default ">
<!-- 4.2.2 --><script type="text/javascript" src="/WebSite5/RadControls/Menu/Scripts/4_2_2/RadMenu.js"></script>

If the file is not physically in the location specified by the src property, or there is a version mismatch, or the file is unaccessible, you will experience 'Radmenu' is undefined error. To make sure that this is really the case, you can copy the path to the RadMenu.js file in the browser and see if you have access to this file. If you cannot retrieve this file you will see the following error message:

Enlarge Click to enlarge

The solution is to make sure that the file is intact, its version matches that of the DLL of the control, and it is in the location specified by the src property. If the file is accessible you will be able to view it or download it:

 Enlarge Click to enlarge

Case 2: UseEmbeddedScripts property of Telerik RadMenu is set to true (Default case)

In this case Telerik RadMenu will search for its java script file embedded in the WebResource.axd as part of the DLL of the control.

The following script will be part of the rendered output of the menu:

Copy Code
<div id="RadMenu1" class="radmenu RadMenu_Default ">
<!-- 4.2.2 --><script type="text/javascript"
src="/WebSite5/WebResource.axd?d=veEwQzFyNPj1RKevCJXcR0qmC8jt0a51jpO7JlDpURPgZZc_w6Hxl
uo14mR8KBv666oIQ77TUP_S55HkUbPNMkSSh7zz7uM4-DBhn5li3t41&t=633083570480000000">
</script>

If you try to view the file from the location specified by the src property, but it is not accessible, you will get the following error:

Enlarge Click to enlarge

The following articles discuss possible causes and solutions of the problem:

  • Troubleshooting WebResource.axd
  • Getting CryptographicException exception "Padding is invalid and cannot be removed" after Migrating to ASP.NET 2.0
  • How To: Configure MachineKey in ASP.NET 2.0

See Also

The control renders as bullet list / Error: 'RadMenu' is undefined
The skin does not apply

© 2002-2008 Telerik. All Rights Reserved.


The Controls collection cannot be modified because the control contains code blocks (i.e.

Telerik RadMenu v4.4 Send comments on this topic.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
Troubleshooting > The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Glossary Item Box

If you receive exceptions such as:

System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

you need to move the javascript code block outside of the head tag. For example:

Before: Copy Code
<head runat="server">
<script>
var controlClientObject = <%= RadControl1.ClientID %>
...
</script>
</head>

<body>
...
</body>
After: Copy Code
<head runat=a?servera?>
</head>
<body>
<script>
var controlClientObject = <%= RadControl1.ClientID %>
...
</script>
...
</body>

© 2002-2008 Telerik. All Rights Reserved.


RadMenu cannot overlay flash object under Firefox browser

Telerik RadMenu v4.4 Send comments on this topic.
RadMenu cannot overlay flash object under Firefox browser
Troubleshooting > RadMenu cannot overlay flash object under Firefox browser

Glossary Item Box

Symptoms

RadMenu goes behind flash objects in Firefox browser.

Solution

Set the wmode attribute of the Flash to opaque (preferably) or transparent.

To the Embed tag, add the following attribute:

Copy Code
<embed ... wmode="opaque" ...>

Here is a couple of articles for additional information on Flash and wmode options:

Flash, DHTML Menus and Accessibility

WHAT IS W-MODE?

© 2002-2008 Telerik. All Rights Reserved.


AnimationSettings Class

RadMenu Send comments on this topic.
AnimationSettings Class
See Also Members
[image]
Telerik.WebControls Namespace : AnimationSettings Class

Represents the animation settings used for expand or collapse effects.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class AnimationSettings
   Inherits MenuObjectWithState
Visual Basic (Usage) Copy Code
Dim instance As AnimationSettings
C#
public class AnimationSettings : MenuObjectWithState

Remarks

RadMenu supports a wide variety of animation effects which are represented by the AnimationSettings class.

  • To customize the animation played when items are opened use the ExpandAnimation property.
  • To customize the animation played when items are closed use the CollapseAnimation property.

Inheritance Hierarchy

System.Object
Telerik.WebControls.MenuObjectWithState
Telerik.WebControls.AnimationSettings

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

AnimationSettings Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


AnimationSettings Class Members

AnimationSettings Class Members
See Also Properties Methods
[image]
Telerik.WebControls Namespace : AnimationSettings Class

The following tables list the members exposed by AnimationSettings.

Public Properties

 | Name | Description
Public Property | Duration | Gets or sets the duration in milliseconds of the animation.
Public Property | Type | Gets or sets the effect that will be used for the animation.
Top

Public Methods

 | Name | Description
Public Method | ToString | (Inherited from MenuObjectWithState)
Top

See Also

Reference

AnimationSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


AnimationSettings Class Properties

AnimationSettings Class Properties
[image]
Telerik.WebControls Namespace : AnimationSettings Class

For a list of all members of this type, see AnimationSettings members.

Public Properties

 | Name | Description
Public Property | Duration | Gets or sets the duration in milliseconds of the animation.
Public Property | Type | Gets or sets the effect that will be used for the animation.
Top

See Also

Reference

AnimationSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Duration Property

Duration Property
[image]
Telerik.WebControls Namespace > AnimationSettings Class : Duration Property

Gets or sets the duration in milliseconds of the animation.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Duration As Integer
Visual Basic (Usage) Copy Code
Dim instance As AnimationSettings
Dim value As Integer

instance.Duration = value

value = instance.Duration
C#
public int Duration {get; set;}

Return Value

An integer representing the duration in milliseconds of the animation.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

AnimationSettings Class
AnimationSettings Members

© 2002-2006, telerik. All Rights Reserved.


Type Property

Type Property
[image]
Telerik.WebControls Namespace > AnimationSettings Class : Type Property

Gets or sets the effect that will be used for the animation.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Type As AnimationType
Visual Basic (Usage) Copy Code
Dim instance As AnimationSettings
Dim value As AnimationType

instance.Type = value

value = instance.Type
C#
public AnimationType Type {get; set;}

Return Value

On of the AnimationType values. The default value is OutQuint.

Remarks

Use the Type property of the AnimationSettings class to customize the effect used for the animation. To turn off animation effects set this property to None.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

AnimationSettings Class
AnimationSettings Members

© 2002-2006, telerik. All Rights Reserved.


MenuDataBinder Class

MenuDataBinder Class
See Also Members
[image]
Telerik.WebControls Namespace : MenuDataBinder Class

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Private Class MenuDataBinder
   Implements IDataBinder
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
C#
private class MenuDataBinder : IDataBinder

Inheritance Hierarchy

System.Object
Telerik.WebControls.MenuDataBinder

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

MenuDataBinder Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


MenuDataBinder Class Members

MenuDataBinder Class Members
See Also Methods
[image]
Telerik.WebControls Namespace : MenuDataBinder Class

The following tables list the members exposed by MenuDataBinder.

Public Constructors

 | Name | Description
Public Constructor | MenuDataBinder Constructor |
Top

Public Methods

 | Name | Description
Public Method | BindToIEnumerable |
Public Method | BindToIHierarchicalEnumerable |
Public Method | BindToIListSource |
Public Method | ConvertDataViewToDataTable |
Public Method | ConvertToIEnumerable |
Top

See Also

Reference

MenuDataBinder Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


MenuDataBinder Constructor

MenuDataBinder Constructor
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : MenuDataBinder Constructor

menu

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal menu As RadMenu _
)
Visual Basic (Usage) Copy Code
Dim menu As RadMenu

Dim instance As MenuDataBinder(menu)
C#
public MenuDataBinder(
   RadMenu menu
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal menu As RadMenu _
)
Visual Basic (Usage) Copy Code
Dim menu As RadMenu

Dim instance As MenuDataBinder(menu)
C#
public MenuDataBinder(
   RadMenu menu
)

Parameters

menu

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


MenuDataBinder Class Methods

MenuDataBinder Class Methods
[image]
Telerik.WebControls Namespace : MenuDataBinder Class

For a list of all members of this type, see MenuDataBinder members.

Public Methods

 | Name | Description
Public Method | BindToIEnumerable |
Public Method | BindToIHierarchicalEnumerable |
Public Method | BindToIListSource |
Public Method | ConvertDataViewToDataTable |
Public Method | ConvertToIEnumerable |
Top

See Also

Reference

MenuDataBinder Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


BindToIEnumerable Method

BindToIEnumerable Method
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : BindToIEnumerable Method

dataSource

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub BindToIEnumerable( _
   ByVal dataSource As IEnumerable _
)
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
Dim dataSource As IEnumerable

instance.BindToIEnumerable(dataSource)
C#
public void BindToIEnumerable(
   IEnumerable dataSource
)

Parameters

dataSource

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


BindToIHierarchicalEnumerable Method

BindToIHierarchicalEnumerable Method
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : BindToIHierarchicalEnumerable Method

items
enumerable
depth

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub BindToIHierarchicalEnumerable( _
   ByVal items As RadMenuItemCollection, _
   ByVal enumerable As IHierarchicalEnumerable, _
   ByVal depth As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
Dim items As RadMenuItemCollection
Dim enumerable As IHierarchicalEnumerable
Dim depth As Integer

instance.BindToIHierarchicalEnumerable(items, enumerable, depth)
C#
public void BindToIHierarchicalEnumerable(
   RadMenuItemCollection items,
   IHierarchicalEnumerable enumerable,
   int depth
)

Parameters

items
enumerable
depth

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


BindToIListSource Method

BindToIListSource Method
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : BindToIListSource Method

listSource

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub BindToIListSource( _
   ByVal listSource As IListSource _
)
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
Dim listSource As IListSource

instance.BindToIListSource(listSource)
C#
public void BindToIListSource(
   IListSource listSource
)

Parameters

listSource

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


ConvertDataViewToDataTable Method

ConvertDataViewToDataTable Method
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : ConvertDataViewToDataTable Method

dataView

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function ConvertDataViewToDataTable( _
   ByVal dataView As DataView _
) As DataTable
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
Dim dataView As DataView
Dim value As DataTable

value = instance.ConvertDataViewToDataTable(dataView)
C#
public DataTable ConvertDataViewToDataTable(
   DataView dataView
)

Parameters

dataView

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


ConvertToIEnumerable Method

ConvertToIEnumerable Method
[image]
Telerik.WebControls Namespace > MenuDataBinder Class : ConvertToIEnumerable Method

dataSource
dataMember

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function ConvertToIEnumerable( _
   ByVal dataSource As Object, _
   ByVal dataMember As String _
) As IEnumerable
Visual Basic (Usage) Copy Code
Dim instance As MenuDataBinder
Dim dataSource As Object
Dim dataMember As String
Dim value As IEnumerable

value = instance.ConvertToIEnumerable(dataSource, dataMember)
C#
public IEnumerable ConvertToIEnumerable(
   object dataSource,
   string dataMember
)

Parameters

dataSource
dataMember

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuDataBinder Class
MenuDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


MenuStateBag Class

MenuStateBag Class
See Also Members
[image]
Telerik.WebControls Namespace : MenuStateBag Class

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Private Class MenuStateBag
Visual Basic (Usage) Copy Code
Dim instance As MenuStateBag
C#
private class MenuStateBag

Inheritance Hierarchy

System.Object
Telerik.WebControls.MenuStateBag

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

MenuStateBag Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


MenuStateBag Class Members

MenuStateBag Class Members
See Also Properties
[image]
Telerik.WebControls Namespace : MenuStateBag Class

The following tables list the members exposed by MenuStateBag.

Public Constructors

 | Name | Description
Public Constructor | MenuStateBag Constructor |
Top

Public Properties

 | Name | Description
Public Property | Item |
Top

See Also

Reference

MenuStateBag Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


MenuStateBag Constructor

MenuStateBag Constructor
[image]
Telerik.WebControls Namespace > MenuStateBag Class : MenuStateBag Constructor

keyPrefix
ownerStateBag

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal keyPrefix As String, _
   ByVal ownerStateBag As StateBag _
)
Visual Basic (Usage) Copy Code
Dim keyPrefix As String
Dim ownerStateBag As StateBag

Dim instance As MenuStateBag(keyPrefix, ownerStateBag)
C#
public MenuStateBag(
   string keyPrefix,
   StateBag ownerStateBag
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal keyPrefix As String, _
   ByVal ownerStateBag As StateBag _
)
Visual Basic (Usage) Copy Code
Dim keyPrefix As String
Dim ownerStateBag As StateBag

Dim instance As MenuStateBag(keyPrefix, ownerStateBag)
C#
public MenuStateBag(
   string keyPrefix,
   StateBag ownerStateBag
)

Parameters

keyPrefix
ownerStateBag

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuStateBag Class
MenuStateBag Members

© 2002-2006, telerik. All Rights Reserved.


MenuStateBag Class Properties

MenuStateBag Class Properties
[image]
Telerik.WebControls Namespace : MenuStateBag Class

For a list of all members of this type, see MenuStateBag members.

Public Properties

 | Name | Description
Public Property | Item |
Top

See Also

Reference

MenuStateBag Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Item Property

Item Property
[image]
Telerik.WebControls Namespace > MenuStateBag Class : Item Property

Key

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Default Property Item( _
   ByVal Key As String _
) As Object
Visual Basic (Usage) Copy Code
Dim instance As MenuStateBag
Dim Key As String
Dim value As Object

instance.Item(Key) = value

value = instance.Item(Key)
C#
public object this[
   string Key
]; {get; set;}

Parameters

Key

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

MenuStateBag Class
MenuStateBag Members

© 2002-2006, telerik. All Rights Reserved.


RadMenu Class

RadMenu Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenu Class

A navigation control used to create collapsing interfaces.

Object Model

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class RadMenu
   Inherits RadSkinnableControl
   Implements IRadMenuItemContainer
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
C#
public class RadMenu : RadSkinnableControl, IRadMenuItemContainer

Remarks

The RadMenu control is used to display a list of items in a Web Forms page.The RadMenu control supports the following features:

  • Databinding that allows the control to be populated from various datasources
  • Programmatic access to the RadMenu object model which allows dynamic creation and customization of menus.
  • Customizable appearance through built-in or user-defined skins.

Items

The RadMenu control is made up of tree of items represented by RadMenuItem objects. Items at the top level (level 0) are called root items. An item that has a parent item is called a child item. All root items are stored in the Items collection. Child items are stored in a parent item's Items collection.

Each item has a Text, NavigateUrl, and a Value property. The value of the Text property is displayed in the RadMenu control, while the Value property is used to store any additional data about the item, such as data passed to the postback event associated with the item. When clicked, an item can navigate to another Web page indicated by the NavigateUrl property.

Inheritance Hierarchy

System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
Telerik.RadMenuUtils.RadControl
Telerik.RadMenuUtils.RadSkinnableControl
Telerik.WebControls.RadMenu

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenu Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenu Class Members

RadMenu Class Members
See Also Properties Methods Events
[image]
Telerik.WebControls Namespace : RadMenu Class

The following tables list the members exposed by RadMenu.

Public Constructors

 | Name | Description
Public Constructor | RadMenu Constructor | Initializes a new instance of the RadMenu class.
Top

Public Properties

 | Name | Description
Public Property | AccessKey | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | AppendDataBoundItems | Gets or sets a value that indicates whether the items are cleared before data binding.
Public Property | AppRelativeTemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Attributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BackColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderWidth | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | CausesValidation | Gets or sets a value indicating whether validation is performed when an item within the RadMenu control is selected.
Public Property | ClickToOpen | Gets or sets a value indicating whether root items should open on mouse click.
Public Property | ClientID | (Inherited from System.Web.UI.Control)
Public Property | CollapseAnimation | Gets the settings for the animation played when an item closes.
Public Property | CollapseDelay | Gets or sets a value indicating the timeout after which a menu item starts to close.
Public Property | ContextMenuElementID | Gets or sets the ID of the html element which if right-clicked will display the context menu.
Public Property | Controls | (Inherited from System.Web.UI.Control)
Public Property | ControlStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ControlStyleCreated | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | CssClass | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | DataBindings |
Public Property | DataFieldID | Gets or sets the field from the data source which is the "child" column in the "parent-child" relationship used to databind the RadMenu control.
Public Property | DataFieldParentID | Gets or sets the field from the data source which is the "parent" column in the "parent-child" relationship used to databind the RadMenu control.
Public Property | DataMember | (Inherited from System.Web.UI.WebControls.DataBoundControl)
Public Property | DataNavigateUrlField | Gets or sets the field from the data source that provides values for the NavigateUrl property of the items.
Public Property | DataSource | Overridden. The DataSource object used for data-binding. Can be either IListSource (DataSet, DataTable, DataView) or ICollection / IEnumerable (ArrayList, arrays, etc)
Public Property | DataSourceID | (Inherited from System.Web.UI.WebControls.DataBoundControl)
Public Property | DataTextField | Gets or sets the field from the data source that provides values for the Text property of the items.
Public Property | DataTextFormatString | Gets or sets the formatting string used to control how the item text would look like.
Public Property | DataValueField | Gets or sets the field from the data source that provides values for the Value property of the items.
Public Property | DefaultGroupSettings | Specifies the default settings for child item behavior.
Public Property | EnableAutoScroll | Gets or sets a value indicating if an automatic scroll is applied if the groups are larger then the screen height.
Public Property | Enabled | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableScreenBoundaryDetection | Gets or sets a value indicating whether the screen boundary detection will be applied when expanded.
Public Property | EnableTheming | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableViewState | (Inherited from System.Web.UI.Control)
Public Property | ExpandAnimation | Gets the settings for the animation played when an item opens.
Public Property | ExpandDelay | Gets or sets a value indicating the timeout after which a menu item starts to open.
Public Property | Flow | Gets or sets a value indicating the way top level items will flow.
Public Property | Font | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ForeColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | HasAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Height | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ID | (Inherited from System.Web.UI.Control)
Public Property | IsContext | Gets or sets a value indicating whether the menu is context or not.
Public Property | Items | Gets the collection of child items in the RadMenu control.
Public Property | ItemTemplate | Gets or sets the template for displaying the items in RadMenu.
Public Property | NamingContainer | (Inherited from System.Web.UI.Control)
Public Property | OnClientContextHidden | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is hidden.
Public Property | OnClientContextShowing | Gets or sets a value indicating the client-side event handler that is called before the RadMenu client-side object is shown.
Public Property | OnClientContextShown | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is shown.
Public Property | OnClientItemBlur | Gets or sets a value indicating the client-side event handler that is called after an item loses focus.
Public Property | OnClientItemClicked | Gets or sets a value indicating the client-side event handler that is called after a menu item is clicked.
Public Property | OnClientItemClicking | Gets or sets a value indicating the client-side event handler that is called when a menu item is clicked.
Public Property | OnClientItemClose | Gets or sets a value indicating the client-side event handler that is called when a group of child items closes.
Public Property | OnClientItemFocus | Gets or sets a value indicating the client-side event handler that is called when a menu item gets focus.
Public Property | OnClientItemOpen | Gets or sets a value indicating the client-side event handler that is called when a group of child items opens.
Public Property | OnClientLoad | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is initialized.
Public Property | OnClientMouseOut | Gets or sets a value indicating the client-side event handler that is called when the mouse moves out of a menu item in the RadMenu control.
Public Property | OnClientMouseOver | Gets or sets a value indicating the client-side event handler that is called when the mouse moves over a menu item in the RadMenu control.
Public Property | Page | (Inherited from System.Web.UI.Control)
Public Property | Parent | (Inherited from System.Web.UI.Control)
Public Property | PostBackUrl | Gets or sets the URL of the page to post to from the current page when an item from the menu is clicked.
Public Property | RadControlsDir | (Inherited from Telerik.RadMenuUtils.RadControl)
Public Property | Site | (Inherited from System.Web.UI.Control)
Public Property | Skin | Overridden. Gets or sets the skin used by RadMenu.
Public Property | SkinID | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | SkinsPath | Overridden. Gets or sets the relative path of the folder containing the skins.
Public Property | Style | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TabIndex | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TemplateControl | (Inherited from System.Web.UI.Control)
Public Property | TemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | ToolTip | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | UniqueID | (Inherited from System.Web.UI.Control)
Public Property | UseEmbeddedScripts | Gets or sets a value indicating whether to use the embedded JavaScript files or not. (Inherited from Telerik.RadMenuUtils.RadControl)
Public Property | ValidationGroup | Note: This property is new in the .NET Framework version 2.0. Gets or sets the name of the validation group to which this validation control belongs.
Public Property | Visible | (Inherited from System.Web.UI.Control)
Public Property | Width | (Inherited from System.Web.UI.WebControls.WebControl)
Top

Public Methods

 | Name | Description
Public Method | ApplyStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ApplyStyleSheetSkin | (Inherited from System.Web.UI.Control)
Public Method | CopyBaseAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | DataBind | (Inherited from System.Web.UI.WebControls.BaseDataBoundControl)
Public Method | Dispose | (Inherited from System.Web.UI.Control)
Public Method | FindControl | (Inherited from System.Web.UI.Control)
Public Method | FindItemByText | Searches the RadMenu control for the first RadMenuItem with a Text property equal to the specified value.
Public Method | FindItemByUrl | Searches the RadMenu control for the first Item with a NavigateUrl property equal to the specified value.
Public Method | FindItemByValue | Searches the RadMenu control for the first RadMenuItem with a Value property equal to the specified value.
Public Method | Focus | (Inherited from System.Web.UI.Control)
Public Method | GetAllItems | Gets a linear list of all items in the RadMenu control.
Public Method | GetXmlString | Gets the RadMenu control structure as a XML string. Added to support the legacy XML format used in previous versions.
Public Method | HasControls | (Inherited from System.Web.UI.Control)
Public Method | LoadContentFile | Populates the RadMenu control from external XML file. Added to support the legacy XML format used in previous versions.
Public Method | LoadXmlString |
Public Method | MergeStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderBeginTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderControl | (Inherited from System.Web.UI.Control)
Public Method | RenderEndTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ResolveClientUrl | (Inherited from System.Web.UI.Control)
Public Method | ResolveUrl | (Inherited from System.Web.UI.Control)
Public Method | SetRenderMethodDelegate | (Inherited from System.Web.UI.Control)
Top

Public Events

 | Name | Description
Public Event | DataBinding | (Inherited from System.Web.UI.Control)
Public Event | DataBound | (Inherited from System.Web.UI.WebControls.BaseDataBoundControl)
Public Event | Disposed | (Inherited from System.Web.UI.Control)
Public Event | Init | (Inherited from System.Web.UI.Control)
Public Event | ItemClick | Occurs on the server when a menu item in the RadMenu control is clicked.
Public Event | ItemCreated | Occurs on the server when an item in the RadMenu control is created.
Public Event | ItemDataBound | Occurs after a menu item is data bound.
Public Event | Load | (Inherited from System.Web.UI.Control)
Public Event | PreRender | (Inherited from System.Web.UI.Control)
Public Event | Unload | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenu Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenu Constructor

RadMenu Constructor
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : RadMenu Constructor

Initializes a new instance of the RadMenu class.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenu()
C#
public RadMenu()

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenu()
C#
public RadMenu()

Example

The following example demonstrates how to programmatically create a RadMenu control.
C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   RadMenu RadMenu1 = new RadMenu();
   RadMenu1.ID = "RadMenu1";

   RadMenuItem sportItem = new RadMenuItem("Sport", "~/Sport.aspx");
   RadMenu1.Items.Add(sportItem);

   RadMenuItem newsItem = new RadMenuItem("News");
   RadMenu1.Items.Add(newsItem);

   PlaceHolder1.Controls.Add(newsItem);
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim RadMenu1 As RadMenu = New RadMenu()
    RadMenu1.ID = "RadMenu1"

    Dim sportItem As RadMenuItem = New RadMenuItem("Sport", "")
    RadMenu1.Items.Add(sportItem)

    Dim newsItem As RadMenuItem = New RadMenuItem("News")
    RadMenu1.Items.Add(newsItem)

    PlaceHolder1.Controls.Add(newsItem)
End Sub

Remarks

Use this constructor to create and initialize a new instance of the RadMenu control.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


RadMenu Class Methods

RadMenu Class Methods
[image]
Telerik.WebControls Namespace : RadMenu Class

For a list of all members of this type, see RadMenu members.

Public Methods

 | Name | Description
Public Method | ApplyStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ApplyStyleSheetSkin | (Inherited from System.Web.UI.Control)
Public Method | CopyBaseAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | DataBind | (Inherited from System.Web.UI.WebControls.BaseDataBoundControl)
Public Method | Dispose | (Inherited from System.Web.UI.Control)
Public Method | FindControl | (Inherited from System.Web.UI.Control)
Public Method | FindItemByText | Searches the RadMenu control for the first RadMenuItem with a Text property equal to the specified value.
Public Method | FindItemByUrl | Searches the RadMenu control for the first Item with a NavigateUrl property equal to the specified value.
Public Method | FindItemByValue | Searches the RadMenu control for the first RadMenuItem with a Value property equal to the specified value.
Public Method | Focus | (Inherited from System.Web.UI.Control)
Public Method | GetAllItems | Gets a linear list of all items in the RadMenu control.
Public Method | GetXmlString | Gets the RadMenu control structure as a XML string. Added to support the legacy XML format used in previous versions.
Public Method | HasControls | (Inherited from System.Web.UI.Control)
Public Method | LoadContentFile | Populates the RadMenu control from external XML file. Added to support the legacy XML format used in previous versions.
Public Method | LoadXmlString |
Public Method | MergeStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderBeginTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderControl | (Inherited from System.Web.UI.Control)
Public Method | RenderEndTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ResolveClientUrl | (Inherited from System.Web.UI.Control)
Public Method | ResolveUrl | (Inherited from System.Web.UI.Control)
Public Method | SetRenderMethodDelegate | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenu Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


FindItemByText Method

FindItemByText Method
[image]
Telerik.WebControls Namespace > RadMenu Class : FindItemByText Method

text
The value to search for.
Searches the RadMenu control for the first RadMenuItem with a Text property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByText( _
   ByVal text As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim text As String
Dim value As RadMenuItem

value = instance.FindItemByText(text)
C#
public RadMenuItem FindItemByText(
   string text
)

Parameters

text
The value to search for.

Return Value

A RadMenuItem whose Text property is equal to the specified value.

Remarks

The method returns the first item matching the search criteria. If no item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


FindItemByUrl Method

FindItemByUrl Method
[image]
Telerik.WebControls Namespace > RadMenu Class : FindItemByUrl Method

url
The value to search for.
Searches the RadMenu control for the first Item with a NavigateUrl property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByUrl( _
   ByVal url As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim url As String
Dim value As RadMenuItem

value = instance.FindItemByUrl(url)
C#
public RadMenuItem FindItemByUrl(
   string url
)

Parameters

url
The value to search for.

Return Value

A Item whose NavigateUrl property is equal to the specified value.

Remarks

The method returns the first Item matching the search criteria. If no Item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


FindItemByValue Method

FindItemByValue Method
[image]
Telerik.WebControls Namespace > RadMenu Class : FindItemByValue Method

value
The value to search for.
Searches the RadMenu control for the first RadMenuItem with a Value property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByValue( _
   ByVal value As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String
Dim value As RadMenuItem

value = instance.FindItemByValue(value)
C#
public RadMenuItem FindItemByValue(
   string value
)

Parameters

value
The value to search for.

Return Value

A RadMenuItem whose Value property is equal to the specified value.

Remarks

The method returns the first item matching the search criteria. If no item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


GetAllItems Method

GetAllItems Method
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : GetAllItems Method

Gets a linear list of all items in the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function GetAllItems() As ArrayList
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As ArrayList

value = instance.GetAllItems()
C#
public ArrayList GetAllItems()

Return Value

An ArrayList containing all items (from all hierarchy levels).

Example

The following example demonstrates how to disable all items within a RadMenu control.
C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   foreach (RadMenuItem item in RadMenu1.GetAllItems())
   {
       item.Enabled = false;
   }
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    For Each childItem As RadMenuItem In RadMenu1.GetAllItems
        childItem.Enabled = False
    Next
End Sub

Remarks

Use the GetAllItems method to obtain a linear collection of all items regardless their place in the hierarchy.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


GetXmlString Method

GetXmlString Method
[image]
Telerik.WebControls Namespace > RadMenu Class : GetXmlString Method

Gets the RadMenu control structure as a XML string. Added to support the legacy XML format used in previous versions.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function GetXmlString() As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

value = instance.GetXmlString()
C#
public string GetXmlString()

Return Value

XML string which contains the whole RadMenu object along with its child items.

Remarks

  1. The GetXmlString method gets all of the public properties of the RadMenu object and enumerates through all of them.
  2. If the current property is in the list of excluded properties ( These are properties which are not serialized. For example, Parent is such a property.) the process jumps to the next item.
  3. If the current value of the property that is being checked is different from the default value of that property, then this property will be serialized, and the new XML node attribute will be created for that property.
  4. After all of the RadMenu properties have been serialized, the GetXmlString method serializes all of the child items using the same algorithm

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


LoadContentFile Method

LoadContentFile Method
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : LoadContentFile Method

xmlFileName
The name of the XML file.
Populates the RadMenu control from external XML file. Added to support the legacy XML format used in previous versions.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub LoadContentFile( _
   ByVal xmlFileName As String _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim xmlFileName As String

instance.LoadContentFile(xmlFileName)
C#
public void LoadContentFile(
   string xmlFileName
)

Parameters

xmlFileName
The name of the XML file.

Example

The following example demonstrates how to populate RadMenu control from XML file.
C# Copy Code
private void Page_Load(object sender, EventArgs e)
{
   if (!Page.IsPostBack)
   {
       RadMenu1.LoadContentFile("~/Menu/Examples/Menu.xml");
   }
}

Visual Basic Copy Code
Private Sub Page_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    If Not Page.IsPostBack Then
        RadMenu1.LoadContentFile("~/Menu/Examples/Menu.xml")
    End If
End Sub

Remarks

The newly added items will be appended after any existing ones.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


LoadXmlString Method

LoadXmlString Method
[image]
Telerik.WebControls Namespace > RadMenu Class : LoadXmlString Method

xmlData

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub LoadXmlString( _
   ByVal xmlData As String _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim xmlData As String

instance.LoadXmlString(xmlData)
C#
public void LoadXmlString(
   string xmlData
)

Parameters

xmlData

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


RadMenu Class Properties

RadMenu Class Properties
[image]
Telerik.WebControls Namespace : RadMenu Class

For a list of all members of this type, see RadMenu members.

Public Properties

 | Name | Description
Public Property | AccessKey | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | AppendDataBoundItems | Gets or sets a value that indicates whether the items are cleared before data binding.
Public Property | AppRelativeTemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Attributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BackColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderWidth | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | CausesValidation | Gets or sets a value indicating whether validation is performed when an item within the RadMenu control is selected.
Public Property | ClickToOpen | Gets or sets a value indicating whether root items should open on mouse click.
Public Property | ClientID | (Inherited from System.Web.UI.Control)
Public Property | CollapseAnimation | Gets the settings for the animation played when an item closes.
Public Property | CollapseDelay | Gets or sets a value indicating the timeout after which a menu item starts to close.
Public Property | ContextMenuElementID | Gets or sets the ID of the html element which if right-clicked will display the context menu.
Public Property | Controls | (Inherited from System.Web.UI.Control)
Public Property | ControlStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ControlStyleCreated | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | CssClass | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | DataBindings |
Public Property | DataFieldID | Gets or sets the field from the data source which is the "child" column in the "parent-child" relationship used to databind the RadMenu control.
Public Property | DataFieldParentID | Gets or sets the field from the data source which is the "parent" column in the "parent-child" relationship used to databind the RadMenu control.
Public Property | DataMember | (Inherited from System.Web.UI.WebControls.DataBoundControl)
Public Property | DataNavigateUrlField | Gets or sets the field from the data source that provides values for the NavigateUrl property of the items.
Public Property | DataSource | Overridden. The DataSource object used for data-binding. Can be either IListSource (DataSet, DataTable, DataView) or ICollection / IEnumerable (ArrayList, arrays, etc)
Public Property | DataSourceID | (Inherited from System.Web.UI.WebControls.DataBoundControl)
Public Property | DataTextField | Gets or sets the field from the data source that provides values for the Text property of the items.
Public Property | DataTextFormatString | Gets or sets the formatting string used to control how the item text would look like.
Public Property | DataValueField | Gets or sets the field from the data source that provides values for the Value property of the items.
Public Property | DefaultGroupSettings | Specifies the default settings for child item behavior.
Public Property | EnableAutoScroll | Gets or sets a value indicating if an automatic scroll is applied if the groups are larger then the screen height.
Public Property | Enabled | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableScreenBoundaryDetection | Gets or sets a value indicating whether the screen boundary detection will be applied when expanded.
Public Property | EnableTheming | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableViewState | (Inherited from System.Web.UI.Control)
Public Property | ExpandAnimation | Gets the settings for the animation played when an item opens.
Public Property | ExpandDelay | Gets or sets a value indicating the timeout after which a menu item starts to open.
Public Property | Flow | Gets or sets a value indicating the way top level items will flow.
Public Property | Font | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ForeColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | HasAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Height | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ID | (Inherited from System.Web.UI.Control)
Public Property | IsContext | Gets or sets a value indicating whether the menu is context or not.
Public Property | Items | Gets the collection of child items in the RadMenu control.
Public Property | ItemTemplate | Gets or sets the template for displaying the items in RadMenu.
Public Property | NamingContainer | (Inherited from System.Web.UI.Control)
Public Property | OnClientContextHidden | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is hidden.
Public Property | OnClientContextShowing | Gets or sets a value indicating the client-side event handler that is called before the RadMenu client-side object is shown.
Public Property | OnClientContextShown | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is shown.
Public Property | OnClientItemBlur | Gets or sets a value indicating the client-side event handler that is called after an item loses focus.
Public Property | OnClientItemClicked | Gets or sets a value indicating the client-side event handler that is called after a menu item is clicked.
Public Property | OnClientItemClicking | Gets or sets a value indicating the client-side event handler that is called when a menu item is clicked.
Public Property | OnClientItemClose | Gets or sets a value indicating the client-side event handler that is called when a group of child items closes.
Public Property | OnClientItemFocus | Gets or sets a value indicating the client-side event handler that is called when a menu item gets focus.
Public Property | OnClientItemOpen | Gets or sets a value indicating the client-side event handler that is called when a group of child items opens.
Public Property | OnClientLoad | Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is initialized.
Public Property | OnClientMouseOut | Gets or sets a value indicating the client-side event handler that is called when the mouse moves out of a menu item in the RadMenu control.
Public Property | OnClientMouseOver | Gets or sets a value indicating the client-side event handler that is called when the mouse moves over a menu item in the RadMenu control.
Public Property | Page | (Inherited from System.Web.UI.Control)
Public Property | Parent | (Inherited from System.Web.UI.Control)
Public Property | PostBackUrl | Gets or sets the URL of the page to post to from the current page when an item from the menu is clicked.
Public Property | RadControlsDir | (Inherited from Telerik.RadMenuUtils.RadControl)
Public Property | Site | (Inherited from System.Web.UI.Control)
Public Property | Skin | Overridden. Gets or sets the skin used by RadMenu.
Public Property | SkinID | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | SkinsPath | Overridden. Gets or sets the relative path of the folder containing the skins.
Public Property | Style | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TabIndex | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TemplateControl | (Inherited from System.Web.UI.Control)
Public Property | TemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | ToolTip | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | UniqueID | (Inherited from System.Web.UI.Control)
Public Property | UseEmbeddedScripts | Gets or sets a value indicating whether to use the embedded JavaScript files or not. (Inherited from Telerik.RadMenuUtils.RadControl)
Public Property | ValidationGroup | Note: This property is new in the .NET Framework version 2.0. Gets or sets the name of the validation group to which this validation control belongs.
Public Property | Visible | (Inherited from System.Web.UI.Control)
Public Property | Width | (Inherited from System.Web.UI.WebControls.WebControl)
Top

See Also

Reference

RadMenu Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


AppendDataBoundItems Property

AppendDataBoundItems Property
[image]
Telerik.WebControls Namespace > RadMenu Class : AppendDataBoundItems Property

Gets or sets a value that indicates whether the items are cleared before data binding.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property AppendDataBoundItems As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.AppendDataBoundItems = value

value = instance.AppendDataBoundItems
C#
public bool AppendDataBoundItems {get; set;}

Return Value

True if items should not be cleared before data binding; otherwise false. The default value is false (child items are cleared).

Remarks

The AppendDataBoundItems property allows you to add items to the RadMenu control before data binding occurs. After data binding, the items collection contains both the items from the data source and the previously added items.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


CausesValidation Property

CausesValidation Property
[image]
Telerik.WebControls Namespace > RadMenu Class : CausesValidation Property

Gets or sets a value indicating whether validation is performed when an item within the RadMenu control is selected.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property CausesValidation As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.CausesValidation = value

value = instance.CausesValidation
C#
public virtual bool CausesValidation {get; set;}

Return Value

true if validation is performed when an item is selected; otherwise, false. The default value is true.

Remarks

By default, page validation is performed when an item is selected. Page validation determines whether the input controls associated with a validation control on the page all pass the validation rules specified by the validation control. You can specify or determine whether validation is performed on both the client and the server when an item is clicked by using the CausesValidation property. To prevent validation from being performed, set the CausesValidation property to false.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ClickToOpen Property

ClickToOpen Property
[image]
Telerik.WebControls Namespace > RadMenu Class : ClickToOpen Property

Gets or sets a value indicating whether root items should open on mouse click.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ClickToOpen As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.ClickToOpen = value

value = instance.ClickToOpen
C#
public bool ClickToOpen {get; set;}

Return Value

True if the root items open on mouse click; otherwise false. The default value is false.

Remarks

Use the ClickToOpen property to customize the way root menu items are opened. By default menu items are opened on mouse hovering.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


CollapseAnimation Property

CollapseAnimation Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : CollapseAnimation Property

Gets the settings for the animation played when an item closes.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property CollapseAnimation As AnimationSettings
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As AnimationSettings

value = instance.CollapseAnimation
C#
public AnimationSettings CollapseAnimation {get;}

Return Value

An AnnimationSettings that represents the collapse animation.

Example

The following example demonstrates how to set the CollapseAnimation of RadMenu.

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server">

<CollapseAnimation Type="OutQuint" Duration="300" />

<Items>

<radM:RadMenuItem Text="News" >

<Items>

<radM:RadMenuItem Text="CNN" NavigateUrl="http://www.cnn.com" />

<radM:RadMenuItem Text="Google News" NavigateUrl="http://news.google.com" />

</Items>

</radM:RadMenuItem>

<radM:RadMenuItem Text="Sport" >

<Items>

<radM:RadMenuItem Text="ESPN" NavigateUrl="http://www.espn.com" />

<radM:RadMenuItem Text="Eurosport" NavigateUrl="http://www.eurosport.com" />

</Items>

</radM:RadMenuItem>

</Items>

</radM:RadMenu>

C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   RadMenu1.CollapseAnimation.Type = AnimationType.Linear;
   RadMenu1.CollapseAnimation.Duration = 300;
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    RadMenu1.CollapseAnimation.Type = AnimationType.Linear
    RadMenu1.CollapseAnimation.Duration = 300
End Sub

Remarks

Use the CollapseAnimation property to customize the expand animation of RadMenu. You can specify the Type, Duration and the items are collapsed.
To disable expand animation effects you should set the Type to AnimationType.None. To customize the expand animation you can use the ExpandAnimation property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


CollapseDelay Property

CollapseDelay Property
[image]
Telerik.WebControls Namespace > RadMenu Class : CollapseDelay Property

Gets or sets a value indicating the timeout after which a menu item starts to close.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property CollapseDelay As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Integer

instance.CollapseDelay = value

value = instance.CollapseDelay
C#
public int CollapseDelay {get; set;}

Return Value

An integer specifying the timeout measured in milliseconds. The default value is 500 (half a second).

Example

The following example demonstrates how to specify one second (1000 milliseconds) timeout prior to item closing:

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server" ClosingDelay="1000" />

Remarks

Use the CollapseDelay property to delay item closing. To cause immediate item closing set this property to 0 (zero).

To customize the timeout prior to item closing use the ExpandDelay property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ContextMenuElementID Property

ContextMenuElementID Property
[image]
Telerik.WebControls Namespace > RadMenu Class : ContextMenuElementID Property

Gets or sets the ID of the html element which if right-clicked will display the context menu.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ContextMenuElementID As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.ContextMenuElementID = value

value = instance.ContextMenuElementID
C#
public string ContextMenuElementID {get; set;}

Remarks

If the ID is empty the menu will appear on right-clicking anywhere on the page. In popup scenarios, where you show the menu programmatically, you can set the ContextMenuElementID property to some nonexisting value e.g. "None".

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataBindings Property

DataBindings Property
[image]
Telerik.WebControls Namespace > RadMenu Class : DataBindings Property

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property DataBindings As RadMenuItemBindingCollection
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As RadMenuItemBindingCollection

value = instance.DataBindings
C#
public RadMenuItemBindingCollection DataBindings {get;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataFieldID Property

DataFieldID Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataFieldID Property

Gets or sets the field from the data source which is the "child" column in the "parent-child" relationship used to databind the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataFieldID As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataFieldID = value

value = instance.DataFieldID
C#
public virtual string DataFieldID {get; set;}

Return Value

A string that specifies the field of the data source that will be the "child" column during databinding. The default is empty string

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Remarks

RadMenu requires both DataFieldID and DataFieldParentID properties to be set in order to be databound recursively.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataFieldParentID Property

DataFieldParentID Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataFieldParentID Property

Gets or sets the field from the data source which is the "parent" column in the "parent-child" relationship used to databind the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataFieldParentID As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataFieldParentID = value

value = instance.DataFieldParentID
C#
public virtual string DataFieldParentID {get; set;}

Return Value

A string that specifies the field of the data source that will be the "parent" column during databinding. The default is empty string.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Remarks

RadMenu requires both DataFieldID and DataFieldParentID properties to be set in order to be databound recursively.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataNavigateUrlField Property

DataNavigateUrlField Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataNavigateUrlField Property

Gets or sets the field from the data source that provides values for the NavigateUrl property of the items.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataNavigateUrlField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataNavigateUrlField = value

value = instance.DataNavigateUrlField
C#
public virtual string DataNavigateUrlField {get; set;}

Return Value

A string that specifies the the field from the data source that provides values for the NavigateUrl property of the items. The default value is empty string.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataSource Property

DataSource Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataSource Property

The DataSource object used for data-binding. Can be either IListSource (DataSet, DataTable, DataView) or ICollection / IEnumerable (ArrayList, arrays, etc)

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overrides Public Property DataSource As Object
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Object

instance.DataSource = value

value = instance.DataSource
C#
public override object DataSource {get; set;}

Return Value

A data source that provides data for populating the RadMenu control.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/data.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/data.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Remarks

RadMenu fully supports binding to IList datasources (DataSet, DataTable) and ICollection / IEnumerable (ArrayList, arrays, etc), so you can easily populate your menu instance with only a few lines of code. The built-in data binding supports auto-binding from a a single self-referencing table with ID -> ParentID relation.

Properties and methods related to data binding:

DataSource - (mandatory) object. Set to an instance of your datasource.

DataMember - (optional) string. If the DataSource is a DataSet and DataMember is set, then RadMenu assumes the DataTable with the respective name in the DataSet. Otherwise the first DataTable in the DataSet is used.

DataFieldID - (optional) string. The name of the DataColumn holding the ID value;

DataFieldParentID - (optional) string. The name of the DataColumn holding the ParentID value;

DataTextField (optional) - Gets or sets the field name from a data source to bind to the MenuItem Text property.

DataValueField (optional) - Gets or sets the field name from a data source to bind to the MenuItem Value property.

DataNavigateUrlField (optional) - Gets or set the field name from a data source to bind to the MenuItem NavigageUrl property.

DataBind() - (mandatory) method. Call this method after you've set the aforementioned properties per your scenario.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataTextField Property

DataTextField Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataTextField Property

Gets or sets the field from the data source that provides values for the Text property of the items.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataTextField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataTextField = value

value = instance.DataTextField
C#
public virtual string DataTextField {get; set;}

Return Value

A string that specifies the field from the data source that provides values for the Text property of the items. The default value is empty string.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataTextFormatString Property

DataTextFormatString Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataTextFormatString Property

Gets or sets the formatting string used to control how the item text would look like.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataTextFormatString As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataTextFormatString = value

value = instance.DataTextFormatString
C#
public virtual string DataTextFormatString {get; set;}

Return Value

A string value representing the format of the Text property.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Remarks

Use the DataTextFormatString property to provide a custom display format for text of the items. The data format string consists of two parts, separated by a colon, in the form { A: Bxx }. For example, the formatting string {0:F2} would format the text as a fixed point number with two decimal places. Note the entire string must be enclosed in braces to indicate that it is a format string and not a literal string. Any text outside the braces is displayed as literal text. The value before the colon (A in the general example) specifies the parameter index in a zero-based list of parameters.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DataValueField Property

DataValueField Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : DataValueField Property

Gets or sets the field from the data source that provides values for the Value property of the items.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataValueField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.DataValueField = value

value = instance.DataValueField
C#
public virtual string DataValueField {get; set;}

Return Value

A string that specifies the field from the data source that provides values for the Value property of the items. The default is empty string.

Example

Visual Basic Copy Code
Dim dbCon As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"))
dbCon.Open()

Dim adapter As New OleDbDataAdapter("SELECT * FROM Links", dbCon)
Dim ds As New DataSet()
adapter.Fill(ds)

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID"
RadMenu1.DataFieldParentID = "ParentID"
RadMenu1.DataNavigateUrlField = "URL"

RadMenu1.DataSource = ds
RadMenu1.DataBind()
C# Copy Code
OleDbConnection dbCon = new OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/menu/Data/Tree.mdb"));
dbCon.Open();

OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM Links", dbCon);
DataSet ds = new DataSet();
adapter.Fill(ds);

RadMenu1.DataTextField = "TextColumn"
RadMenu1.DataValueField = "ValueColumn"
RadMenu1.DataFieldID = "ID";
RadMenu1.DataFieldParentID = "ParentID";
RadMenu1.DataNavigateUrlField = "URL";

RadMenu1.DataSource = ds;
RadMenu1.DataBind();

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


DefaultGroupSettings Property

DefaultGroupSettings Property
[image]
Telerik.WebControls Namespace > RadMenu Class : DefaultGroupSettings Property

Specifies the default settings for child item behavior.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property DefaultGroupSettings As RadMenuItemGroupSettings
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As RadMenuItemGroupSettings

value = instance.DefaultGroupSettings
C#
public RadMenuItemGroupSettings DefaultGroupSettings {get;}

Return Value

An instance of the MenuItemGroupSettings class.

Remarks

You can customize the following settings

  • item flow
  • expand direction
  • horizontal offset from the parent item
  • vertical offset from the parent item
  • width
  • height

For more information check MenuItemGroupSettings.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


EnableAutoScroll Property

EnableAutoScroll Property
[image]
Telerik.WebControls Namespace > RadMenu Class : EnableAutoScroll Property

Gets or sets a value indicating if an automatic scroll is applied if the groups are larger then the screen height.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property EnableAutoScroll As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.EnableAutoScroll = value

value = instance.EnableAutoScroll
C#
public bool EnableAutoScroll {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


EnableScreenBoundaryDetection Property

EnableScreenBoundaryDetection Property
[image]
Telerik.WebControls Namespace > RadMenu Class : EnableScreenBoundaryDetection Property

Gets or sets a value indicating whether the screen boundary detection will be applied when expanded.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property EnableScreenBoundaryDetection As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.EnableScreenBoundaryDetection = value

value = instance.EnableScreenBoundaryDetection
C#
public bool EnableScreenBoundaryDetection {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ExpandAnimation Property

ExpandAnimation Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : ExpandAnimation Property

Gets the settings for the animation played when an item opens.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property ExpandAnimation As AnimationSettings
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As AnimationSettings

value = instance.ExpandAnimation
C#
public AnimationSettings ExpandAnimation {get;}

Return Value

An AnnimationSettings that represents the expand animation.

Example

The following example demonstrates how to set the ExpandAnimation of RadMenu.

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server">

<ExpandAnimation Type="OutQuint" Duration="300" />

<Items>

<radM:RadMenuItem Text="News" >

<Items>

<radM:RadMenuItem Text="CNN" NavigateUrl="http://www.cnn.com" />

<radM:RadMenuItem Text="Google News" NavigateUrl="http://news.google.com" />

</Items>

</radM:RadMenuItem>

<radM:RadMenuItem Text="Sport" >

<Items>

<radM:RadMenuItem Text="ESPN" NavigateUrl="http://www.espn.com" />

<radM:RadMenuItem Text="Eurosport" NavigateUrl="http://www.eurosport.com" />

</Items>

</radM:RadMenuItem>

</Items>

</radM:RadMenu>

C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   RadMenu1.ExpandAnimation.Type = AnimationType.Linear;
   RadMenu1.ExpandAnimation.Duration = 300;
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    RadMenu1.ExpandAnimation.Type = AnimationType.Linear
    RadMenu1.ExpandAnimation.Duration = 300
End Sub

Remarks

Use the ExpandAnimation property to customize the expand animation of RadMenu. You can specify the Type, Duration and the To disable expand animation effects you should set the Type to AnimationType.None.
To customize the collapse animation you can use the CollapseAnimation property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ExpandDelay Property

ExpandDelay Property
[image]
Telerik.WebControls Namespace > RadMenu Class : ExpandDelay Property

Gets or sets a value indicating the timeout after which a menu item starts to open.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ExpandDelay As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Integer

instance.ExpandDelay = value

value = instance.ExpandDelay
C#
public int ExpandDelay {get; set;}

Return Value

An integer specifying the timeout measured in milliseconds. The default value is 100 milliseconds.

Example

The following example demonstrates how to specify a half second (500 milliseconds) timeout prior to item opening:

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server" ExpandDelay="500" />

Remarks

Use the ExpandDelay property to delay item opening.

To customize the timeout prior to item closing use the CollapseDelay property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


Flow Property

Flow Property
[image]
Telerik.WebControls Namespace > RadMenu Class : Flow Property

Gets or sets a value indicating the way top level items will flow.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Flow As ItemFlow
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As ItemFlow

instance.Flow = value

value = instance.Flow
C#
public ItemFlow Flow {get; set;}

Return Value

One of the ItemFlow values. The default value for top level items is Horizontal.

Example

The following example demonstrates how to make a vertical menu.

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server" Flow="Vertical" />

Remarks

Use the Flow property to customize the way top level items are displayed. If set to Horizontal items are positioned one after another. Vertical causes the items to flow one below the other.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


IsContext Property

IsContext Property
[image]
Telerik.WebControls Namespace > RadMenu Class : IsContext Property

Gets or sets a value indicating whether the menu is context or not.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property IsContext As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.IsContext = value

value = instance.IsContext
C#
public bool IsContext {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


Items Property

Items Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : Items Property

Gets the collection of child items in the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Items As RadMenuItemCollection
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As RadMenuItemCollection

value = instance.Items
C#
public RadMenuItemCollection Items {get;}

Return Value

A RadMenuItemCollection that represents the children within the RadMenu control. The default is empty collection.

Example

The following example demonstrates how to programmatically add items.
C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   if (!Page.IsPostBack)
   {
       RadMenuItem corporateItem = new RadMenuItem("Corporate");
       RadMenu1.Items.Add(corporateItem);

       RadMenuItem newsItem = new RadMenuItem("News");
       RadMenu1.Items.Add(newsItem);

       RadMenuItem aboutUsItem = new RadMenuItem("About us");
       RadMenu1.Items.Add(aboutUsItem);
   }
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        Dim corporateItem As RadMenuItem = New RadMenuItem("Corporate")
        RadMenu1.Items.Add(newsItem)

        Dim newsItem As RadMenuItem = New RadMenuItem("News")
        RadMenu1.Items.Add(newsItem)

        Dim aboutUsItem As RadMenuItem = New RadMenuItem("About us")
        RadMenu1.Items.Add(aboutUsItem)
    End If
End Sub

Remarks

Use this property to retrieve the child items of the RadMenu control. You can also use it to programmatically add or remove items.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ItemTemplate Property

ItemTemplate Property
[image]
Telerik.WebControls Namespace > RadMenu Class : ItemTemplate Property

Gets or sets the template for displaying the items in RadMenu.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property ItemTemplate As ITemplate
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As ITemplate

instance.ItemTemplate = value

value = instance.ItemTemplate
C#
public virtual ITemplate ItemTemplate {get; set;}

Return Value

A ITemplate implemented object that contains the template for displaying menu items. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

The ItemTemplate property sets a template that will be used for all menu items.

To specify unique display for individual items use the ItemTemplate property of the RadMenuItem class.

Example

The following example demonstrates how to use the ItemTemplate property to add a CheckBox for each item.

ASPX:

<radM:RadMenu runat="server" ID="RadMenu1">

<ItemTemplate>

<asp:CheckBox runat="server"
                        ID="CheckBox"></asp:CheckBox>
<asp:Label runat="server" ID="Label1"

Text='<Eval>'

></asp:Label>

</ItemTemplate>

<Items>

<radM:RadMenuItem Text="News" />

<radM:RadMenuItem Text="Sports" />

<radM:RadMenuItem Text="Games" />

</Items>

</radM:RadMenu>

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientContextHidden Property

OnClientContextHidden Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientContextHidden Property

Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is hidden.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientContextHidden As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientContextHidden = value

value = instance.OnClientContextHidden
C#
public string OnClientContextHidden {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientContextHiddenHandler(sender)
{
alert(sender.ID);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientContextHidden="OnClientContextHiddenHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientContextHidden client-side event handler is called after the context menu is hidden on the client.

A single parameter - the menu client object - is passed to the handler.

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientContextShowing Property

OnClientContextShowing Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientContextShowing Property

Gets or sets a value indicating the client-side event handler that is called before the RadMenu client-side object is shown.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientContextShowing As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientContextShowing = value

value = instance.OnClientContextShowing
C#
public string OnClientContextShowing {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientContextShowingHandler(sender)
{
alert(sender.ID);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientContextShowing= "OnClientContextShowingHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientContextShowing client-side event handler is called before the context menu is shown on the client.

A single parameter - the menu client object - is passed to the handler.

The OnClientContextShowing event can be cancelled. To do so, return false from the event handler.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientContextShown Property

OnClientContextShown Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientContextShown Property

Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is shown.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientContextShown As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientContextShown = value

value = instance.OnClientContextShown
C#
public string OnClientContextShown {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientContextShownHandler(sender)
{
alert(sender.ID);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientContextShown="OnClientContextShownHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientContextShown client-side event handler is called after the context menu is shown on the client.

A single parameter - the menu client object - is passed to the handler.

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemBlur Property

OnClientItemBlur Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemBlur Property

Gets or sets a value indicating the client-side event handler that is called after an item loses focus.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemBlur As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemBlur = value

value = instance.OnClientItemBlur
C#
public string OnClientItemBlur {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemBlurHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemBlur="OnClientItemBlurHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientItemBlur client-side event handler is called when a menu item loses focus as a result of the user pressing a key or clicking elsewhere on the page. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemClicked Property

OnClientItemClicked Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemClicked Property

Gets or sets a value indicating the client-side event handler that is called after a menu item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemClicked As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemClicked = value

value = instance.OnClientItemClicked
C#
public string OnClientItemClicked {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemClickedHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClicked="OnClientItemClickedHandler">
....
</radM:RadMenu>

Remarks

This event is similar to OnClientItemFocus but fires only on mouse click.

If specified, the OnClientItemClicked client-side event handler is called after a menu item is clicked upon. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemClicking Property

OnClientItemClicking Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemClicking Property

Gets or sets a value indicating the client-side event handler that is called when a menu item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemClicking As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemClicking = value

value = instance.OnClientItemClicking
C#
public string OnClientItemClicking {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemClickingHandler(sender, eventArgs)
{
if (eventArgs.Item.Text == "News")
{

return false;

}
}
</script>
<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClicking="OnClientItemClickingHandler">
....
</radM:RadMenu>

Remarks

This event is similar to OnClientItemFocus but fires only on mouse click.

If specified, the OnClientItemClicking client-side event handler is called before a menu item is clicked upon. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

The OnClientItemClicking event can be cancelled. To do so, return False from the event handler.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemClose Property

OnClientItemClose Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemClose Property

Gets or sets a value indicating the client-side event handler that is called when a group of child items closes.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemClose As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemClose = value

value = instance.OnClientItemClose
C#
public string OnClientItemClose {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemCloseHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemClose="OnClientItemCloseHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientItemClose client-side event handler is called when a group of child items closes. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemFocus Property

OnClientItemFocus Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemFocus Property

Gets or sets a value indicating the client-side event handler that is called when a menu item gets focus.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemFocus As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemFocus = value

value = instance.OnClientItemFocus
C#
public string OnClientItemFocus {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemFocusHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemFocus="OnClientItemFocusHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientItemFocus client-side event handler is called when a menu item is selected using either the keyboard (the [TAB] or arrow keys) or by clicking it. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientItemOpen Property

OnClientItemOpen Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientItemOpen Property

Gets or sets a value indicating the client-side event handler that is called when a group of child items opens.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientItemOpen As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientItemOpen = value

value = instance.OnClientItemOpen
C#
public string OnClientItemOpen {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientItemOpenHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat="server"
OnClientItemOpen="OnClientItemOpenHandler">
....
</radM:RadMenu>

Requirements

If specified, the OnClientItemOpen client-side event handler is called when a group of child items opens. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientLoad Property

OnClientLoad Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientLoad Property

Gets or sets a value indicating the client-side event handler that is called after the RadMenu client-side object is initialized.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientLoad As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientLoad = value

value = instance.OnClientLoad
C#
public string OnClientLoad {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientLoadHandler(sender)
{
alert(sender.ID);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientLoad= "OnClientLoadHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClienLoad client-side event handler is called after the menu is fully initialized on the client.

A single parameter - the menu client object - is passed to the handler.

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientMouseOut Property

OnClientMouseOut Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientMouseOut Property

Gets or sets a value indicating the client-side event handler that is called when the mouse moves out of a menu item in the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientMouseOut As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientMouseOut = value

value = instance.OnClientMouseOut
C#
public string OnClientMouseOut {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

<script type="text/javascript">
function OnClientMouseOutHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>

<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientMouseOut= "OnClientMouseOutHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientMouseOut client-side event handler is called when the mouse moves out of a menu item. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


OnClientMouseOver Property

OnClientMouseOver Property
[image]
Telerik.WebControls Namespace > RadMenu Class : OnClientMouseOver Property

Gets or sets a value indicating the client-side event handler that is called when the mouse moves over a menu item in the RadMenu control.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OnClientMouseOver As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.OnClientMouseOver = value

value = instance.OnClientMouseOver
C#
public string OnClientMouseOver {get; set;}

Return Value

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Example

The following example demonstrates how to use the OnClientMouseOver property.

<script type="text/javascript">
function OnClientMouseOverHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<radM:RadMenu ID="RadMenu1"
runat= "server"
OnClientMouseOver= "OnClientMouseOverHandler">
....
</radM:RadMenu>

Remarks

If specified, the OnClientMouseOver client-side event handler is called when the mouse moves over a menu item. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


PostBackUrl Property

PostBackUrl Property
[image]
Telerik.WebControls Namespace > RadMenu Class : PostBackUrl Property

Gets or sets the URL of the page to post to from the current page when an item from the menu is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property PostBackUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.PostBackUrl = value

value = instance.PostBackUrl
C#
public virtual string PostBackUrl {get; set;}

Return Value

The URL of the Web page to post to from the current page when an item from the menu control is clicked. The default value is an empty string (""), which causes the page to post back to itself.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


Skin Property

Skin Property
[image]
Telerik.WebControls Namespace > RadMenu Class : Skin Property

Gets or sets the skin used by RadMenu.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overrides Public Property Skin As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.Skin = value

value = instance.Skin
C#
public override string Skin {get; set;}

Return Value

A String specifying the skin. The default value is empty string ("").

Remarks

If the value is empty string ("") no skin is used.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


SkinsPath Property

SkinsPath Property
[image]
Telerik.WebControls Namespace > RadMenu Class : SkinsPath Property

Gets or sets the relative path of the folder containing the skins.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overrides Public Property SkinsPath As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.SkinsPath = value

value = instance.SkinsPath
C#
public override string SkinsPath {get; set;}

Return Value

A string specifying the relative path to the folder which contains RadMenu skins. The default value is "~/RadControls/Menu/Skins".

Example

If the skin folder is located in the project root and is named "Skins" the SkinsPath property should be set to: "~/Skins". Then you can create subfolders for individual skins e.g. Skins/Gold, Skins/Default etc.

Remarks

RadMenu ships with a set of predefined skins which are ready to use. They are located in RadControls/Menu/Skins.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ValidationGroup Property

ValidationGroup Property
[image]
Telerik.WebControls Namespace > RadMenu Class : ValidationGroup Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the name of the validation group to which this validation control belongs.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ValidationGroup As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.ValidationGroup = value

value = instance.ValidationGroup
C#
public string ValidationGroup {get; set;}

Return Value

The name of the validation group to which this validation control belongs. The default is an empty string (""), which indicates that this property is not set.

Remarks

This property works only when CausesValidation is set to true.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


RadMenu Class Events

RadMenu Class Events
[image]
Telerik.WebControls Namespace : RadMenu Class

For a list of all members of this type, see RadMenu members.

Public Events

 | Name | Description
Public Event | DataBinding | (Inherited from System.Web.UI.Control)
Public Event | DataBound | (Inherited from System.Web.UI.WebControls.BaseDataBoundControl)
Public Event | Disposed | (Inherited from System.Web.UI.Control)
Public Event | Init | (Inherited from System.Web.UI.Control)
Public Event | ItemClick | Occurs on the server when a menu item in the RadMenu control is clicked.
Public Event | ItemCreated | Occurs on the server when an item in the RadMenu control is created.
Public Event | ItemDataBound | Occurs after a menu item is data bound.
Public Event | Load | (Inherited from System.Web.UI.Control)
Public Event | PreRender | (Inherited from System.Web.UI.Control)
Public Event | Unload | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenu Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ItemClick Event

ItemClick Event
[image]
Telerik.WebControls Namespace > RadMenu Class : ItemClick Event

Occurs on the server when a menu item in the RadMenu control is clicked.

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Event ItemClick() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemClick, handler
C#
public event RadMenuEventHandler ItemClick()

Syntax

Visual Basic (Declaration)
Public Event ItemClick() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemClick, handler
C#
public event RadMenuEventHandler ItemClick()

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Remarks

The menu will also postback if you navigate to a menu item using the [menu item] key and then press [enter] on the menu item that is focused. The instance of the clicked menu item is passed to the MenuItemClick event handler - you can obtain a reference to it using the eventArgs.RadMenuItem property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ItemCreated Event

ItemCreated Event
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : ItemCreated Event

Occurs on the server when an item in the RadMenu control is created.

Example

The following example demonstrates how to use the ItemCreated event to set the ToolTip property of each item.

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Event ItemCreated() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemCreated, handler
C#
public event RadMenuEventHandler ItemCreated()

Syntax

Visual Basic (Declaration)
Public Event ItemCreated() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemCreated, handler
C#
public event RadMenuEventHandler ItemCreated()

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Example

The following example demonstrates how to use the ItemCreated event to set the ToolTip property of each item.
C# Copy Code
private void RadMenu1_ItemCreated(object sender, Telerik.WebControls.RadMenuItemEventArgs e)
{
   e.Item.ToolTip = e.Item.Text;
}

Visual Basic Copy Code
Sub RadMenu1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.WebControls.RadMenuItemEventArgs) Handles RadMenu1.ItemCreated
    e.Item.ToolTip = e.Item.Text
End Sub

Remarks

The ItemCreated event is raised every time a new item is added.

The ItemCreated event is not related to data binding and you cannot retrieve the DataItem of the item in the event handler.

The ItemCreated event is often useful in scenarios where you want to initialize all items - for example setting the ToolTip of each RadMenuItem to be equal to the Text property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


ItemDataBound Event

ItemDataBound Event
See Also Example
[image]
Telerik.WebControls Namespace > RadMenu Class : ItemDataBound Event

Occurs after a menu item is data bound.

Example

The following example demonstrates how to map fields from the data item to item properties using the ItemDataBound event.

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Event ItemDataBound() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemDataBound, handler
C#
public event RadMenuEventHandler ItemDataBound()

Syntax

Visual Basic (Declaration)
Public Event ItemDataBound() As RadMenuEventHandler
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim handler As RadMenuEventHandler

AddHandler instance.ItemDataBound, handler
C#
public event RadMenuEventHandler ItemDataBound()

Event Data

The event handler receives an argument of type RadMenuEventArgs containing data related to this event. The following RadMenuEventArgs properties provide information specific to this event.

Property | Description
Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Example

The following example demonstrates how to map fields from the data item to item properties using the ItemDataBound event.
C# Copy Code
private void RadMenu1_ItemDataBound(object sender, Telerik.WebControls.RadMenuEventArgs e)
{
   RadMenuItem item = e.RadMenuItem;
   DataRowView dataRow = (DataRowView) e.Item.DataItem;

   item.ImageUrl = "image" + dataRow["ID"].ToString() + ".gif";
   item.NavigateUrl = dataRow["URL"].ToString();
}

Visual Basic Copy Code
Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As RadMenuEventArgs) Handles RadMenu1.ItemDataBound
    Dim item As RadMenuItem = e.RadMenuItem
    Dim dataRow As DataRowView = CType(e.Item.DataItem, DataRowView)

    item.ImageUrl = "image" + dataRow("ID").ToString() + ".gif"
    item.NavigateUrl = dataRow("URL").ToString()
End Sub

Remarks

The ItemDataBound event is raised for each menu item upon databinding. You can retrieve the item being bound using the event arguments. The DataItem associated with the item can be retrieved using the DataItem property.

The ItemDataBound event is often used in scenarios when you want to perform additional mapping of fields from the DataItem to their respective properties in the RadMenuItem class.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuEventArgs Class

RadMenuEventArgs Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuEventArgs Class

Object Model

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class RadMenuEventArgs
   Inherits EventArgs
Visual Basic (Usage) Copy Code
Dim instance As RadMenuEventArgs
C#
public class RadMenuEventArgs : EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
Telerik.WebControls.RadMenuEventArgs

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuEventArgs Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuEventArgs Class Members

RadMenuEventArgs Class Members
See Also Properties
[image]
Telerik.WebControls Namespace : RadMenuEventArgs Class

The following tables list the members exposed by RadMenuEventArgs.

Public Constructors

 | Name | Description
Public Constructor | RadMenuEventArgs Constructor | Initializes a new instance of the RadMenuEventArgs class.
Top

Public Properties

 | Name | Description
Public Property | Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.
Top

See Also

Reference

RadMenuEventArgs Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuEventArgs Constructor

RadMenuEventArgs Constructor
[image]
Telerik.WebControls Namespace > RadMenuEventArgs Class : RadMenuEventArgs Constructor

item
A RadMenuItem which represents an item in the RadMenu control.
Initializes a new instance of the RadMenuEventArgs class.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal item As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim item As RadMenuItem

Dim instance As RadMenuEventArgs(item)
C#
public RadMenuEventArgs(
   RadMenuItem item
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal item As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim item As RadMenuItem

Dim instance As RadMenuEventArgs(item)
C#
public RadMenuEventArgs(
   RadMenuItem item
)

Parameters

item
A RadMenuItem which represents an item in the RadMenu control.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuEventArgs Class
RadMenuEventArgs Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuEventArgs Class Properties

RadMenuEventArgs Class Properties
[image]
Telerik.WebControls Namespace : RadMenuEventArgs Class

For a list of all members of this type, see RadMenuEventArgs members.

Public Properties

 | Name | Description
Public Property | Item | Gets the referenced RadMenuItem in the RadMenu control when the event is raised.
Top

See Also

Reference

RadMenuEventArgs Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Item Property

Item Property
[image]
Telerik.WebControls Namespace > RadMenuEventArgs Class : Item Property

Gets the referenced RadMenuItem in the RadMenu control when the event is raised.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Item As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuEventArgs
Dim value As RadMenuItem

value = instance.Item
C#
public RadMenuItem Item {get;}

Return Value

The referenced item in the RadMenu control when the event is raised.

Remarks

Use this property to programmatically access the item referenced in the RadMenu when the event is raised.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuEventArgs Class
RadMenuEventArgs Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Class

RadMenuItem Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuItem Class

Represents a single item in the RadMenu class.

Object Model

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class RadMenuItem
   Inherits WebControl
   Implements IRadMenuItemContainer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
C#
public class RadMenuItem : WebControl, IRadMenuItemContainer

Remarks

The RadMenu control is made up of a hierarchy of menu items represented by RadMenuItem objects. Menu items at the top level (level 0) that do not have a parent menu item are called root or top-level menu items. A menu item that has a parent menu item is called a submenu item. All root menu items are stored in the Items collection of the menu. Submenu items are stored in a parent menu item's Items collection. You can access a menu item's parent menu item by using the Owner property.

To create the menu items for a RadMenu control, use one of the following methods:

  • Use declarative syntax to create static menu items.
  • Use a constructor to dynamically create new instances of the RadMenuItem class. These RadMenuItem objects can then be added to the Items collection of their owner.
  • Bind the Menu control to a data source.

When the user clicks a menu item, the Menu control can either navigate to a linked Web page or simply post back to the server. If the NavigateUrl property of a menu item is set, the RadMenu control navigates to the linked page. By default, a linked page is displayed in the same window or frame as the RadMenu control. To display the linked content in a different window or frame, use the Target property.

Each menu item has a Text and a Value property. The value of the Text property is displayed in the RadMenu control, while the Value property is used to store any additional data about the menu item.

Inheritance Hierarchy

System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
Telerik.WebControls.RadMenuItem

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuItem Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Class Members

RadMenuItem Class Members
See Also Properties Methods Events
[image]
Telerik.WebControls Namespace : RadMenuItem Class

The following tables list the members exposed by RadMenuItem.

Public Constructors

 | Name | Description
Public Constructor | RadMenuItem Constructor | Overloaded. Initializes a new instance of the RadMenuItem class.
Top

Public Properties

 | Name | Description
Public Property | AccessKey | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | AppRelativeTemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Attributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BackColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderWidth | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ClickedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is clicked.
Public Property | ClientID | (Inherited from System.Web.UI.Control)
Public Property | Controls | (Inherited from System.Web.UI.Control)
Public Property | ControlStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ControlStyleCreated | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | DataItem | Gets or sets the data item represented by the item.
Public Property | DisabledCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is disabled.
Public Property | DisabledImageUrl | Gets or sets the path to an image to display when the items is disabled.
Public Property | EnableTheming | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableViewState | (Inherited from System.Web.UI.Control)
Public Property | ExpandedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible).
Public Property | ExpandedImageUrl | Gets or sets the path to an image to display when the items is expanded.
Public Property | FocusedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is focused.
Public Property | Font | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ForeColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | GroupSettings | Specifies the settings for child item behavior.
Public Property | HasAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Height | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ID | Overridden. This property is being used internally by the RadMenu control. Setting it may lead to unpredictable results.
Public Property | ImageClickedUrl | Gets or sets the path to an image to display for the item when the user clicks the item.
Public Property | ImageOverUrl | Gets or sets the path to an image to display for the item when the user moves the mouse over the item.
Public Property | ImageUrl | Gets or sets the path to an image to display for the item.
Public Property | Index | Gets the zero based index of the item in the Items collection of its parent.
Public Property | IsSeparator | Sets or gets whether the item is separator. It also represents a logical state of the item. Might be used in some applications for keyboard navigation to omit processing items that are marked as separators.
Public Property | Items | Gets the collection of child items in the menu item.
Public Property | ItemTemplate | Gets or sets the template for displaying the item.
Public Property | Level | Manages the item level of a particular Item instance. This property allows easy implementation/separation of the menu items in levels.
Public Property | Menu | Gets the RadMenu instance which contains the item.
Public Property | NamingContainer | (Inherited from System.Web.UI.Control)
Public Property | NavigateUrl | Gets or sets the URL to link to when the item is clicked.
Public Property | Owner | Gets the IRadMenuItemContainer which contains the item.
Public Property | Page | (Inherited from System.Web.UI.Control)
Public Property | Parent | (Inherited from System.Web.UI.Control)
Public Property | PostBack | Gets or sets a value indicating whether clicking on the item will postback.
Public Property | Site | (Inherited from System.Web.UI.Control)
Public Property | SkinID | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Style | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TabIndex | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Target | Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.
Public Property | TemplateControl | (Inherited from System.Web.UI.Control)
Public Property | TemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Text | Gets or sets the text caption for the menu item.
Public Property | ToolTip | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | UniqueID | (Inherited from System.Web.UI.Control)
Public Property | Value | Gets or sets the value associated with the menu item.
Public Property | Width | (Inherited from System.Web.UI.WebControls.WebControl)
Top

Public Methods

 | Name | Description
Public Method | ApplyStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ApplyStyleSheetSkin | (Inherited from System.Web.UI.Control)
Public Method | Clone | Creates a copy of the current RadMenuItem object.
Public Method | CopyBaseAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | DataBind | (Inherited from System.Web.UI.Control)
Public Method | Dispose | (Inherited from System.Web.UI.Control)
Public Method | FindControl | (Inherited from System.Web.UI.Control)
Public Method | Focus | (Inherited from System.Web.UI.Control)
Public Method | HasControls | (Inherited from System.Web.UI.Control)
Public Method | HighlightPath |
Public Method | MergeStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderControl | (Inherited from System.Web.UI.Control)
Public Method | RenderEndTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ResolveClientUrl | (Inherited from System.Web.UI.Control)
Public Method | ResolveUrl | (Inherited from System.Web.UI.Control)
Public Method | SetRenderMethodDelegate | (Inherited from System.Web.UI.Control)
Top

Public Events

 | Name | Description
Public Event | DataBinding | (Inherited from System.Web.UI.Control)
Public Event | Disposed | (Inherited from System.Web.UI.Control)
Public Event | Init | (Inherited from System.Web.UI.Control)
Public Event | Load | (Inherited from System.Web.UI.Control)
Public Event | PreRender | (Inherited from System.Web.UI.Control)
Public Event | Unload | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenuItem Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Constructor

RadMenuItem Constructor
[image]
Telerik.WebControls Namespace > RadMenuItem Class : RadMenuItem Constructor

Initializes a new instance of the RadMenuItem class.

Overload List

Overload | Description
RadMenuItem Constructor() | Initializes a new instance of the RadMenuItem class.
RadMenuItem Constructor(String) | Initializes a new instance of the RadMenuItem class with the specified text data.
RadMenuItem Constructor(String,String) | Initializes a new instance of the RadMenuItem class with the specified text and URL to navigate to.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Constructor()

RadMenuItem Constructor()
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItem Class > RadMenuItem Constructor : RadMenuItem Constructor()

Initializes a new instance of the RadMenuItem class.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem()
C#
public RadMenuItem()

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem()
C#
public RadMenuItem()

Example

The following example demonstrates how to add items to RadMenu controls.
C# Copy Code
RadMenuItem item = new RadMenuItem();
item.Text = "News";
item.NavigateUrl = "~/News.aspx";

RadMenu1.Items.Add(item);

Visual Basic Copy Code
Dim item As New RadMenuItem()
item.Text = "News"
item.NavigateUrl = "~/News.aspx"

RadMenu1.Items.Add(item)

Remarks

Use this constructor to create and initialize a new instance of the RadMenuItem class using default values.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members
Overload List

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Constructor(String)

RadMenuItem Constructor(String)
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItem Class > RadMenuItem Constructor : RadMenuItem Constructor(String)

text
The text of the item. The Text property is set to the value of this parameter.
Initializes a new instance of the RadMenuItem class with the specified text data.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal text As String _
)
Visual Basic (Usage) Copy Code
Dim text As String

Dim instance As RadMenuItem(text)
C#
public RadMenuItem(
   string text
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal text As String _
)
Visual Basic (Usage) Copy Code
Dim text As String

Dim instance As RadMenuItem(text)
C#
public RadMenuItem(
   string text
)

Parameters

text
The text of the item. The Text property is set to the value of this parameter.

Example

The following example demonstrates how to add items to RadMenu controls.
C# Copy Code
RadMenuItem item = new RadMenuItem("News");

RadMenu1.Items.Add(item);

Visual Basic Copy Code
Dim item As New RadMenuItem("News")

RadMenu1.Items.Add(item)

Remarks

Use this constructor to create and initialize a new instance of the RadMenuItem class using the specified text.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members
Overload List

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Constructor(String,String)

RadMenuItem Constructor(String,String)
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItem Class > RadMenuItem Constructor : RadMenuItem Constructor(String,String)

text
The text of the item. The Text property is set to the value of this parameter.
navigateUrl
The url which the item will navigate to. The NavigateUrl property is set to the value of this parameter.
Initializes a new instance of the RadMenuItem class with the specified text and URL to navigate to.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal text As String, _
   ByVal navigateUrl As String _
)
Visual Basic (Usage) Copy Code
Dim text As String
Dim navigateUrl As String

Dim instance As RadMenuItem(text, navigateUrl)
C#
public RadMenuItem(
   string text,
   string navigateUrl
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal text As String, _
   ByVal navigateUrl As String _
)
Visual Basic (Usage) Copy Code
Dim text As String
Dim navigateUrl As String

Dim instance As RadMenuItem(text, navigateUrl)
C#
public RadMenuItem(
   string text,
   string navigateUrl
)

Parameters

text
The text of the item. The Text property is set to the value of this parameter.
navigateUrl
The url which the item will navigate to. The NavigateUrl property is set to the value of this parameter.

Example

This example demonstrates how to add items to RadMenu controls.
C# Copy Code
RadMenuItem item = new RadMenuItem("News", "~/News.aspx");

RadMenu1.Items.Add(item);

Visual Basic Copy Code
Dim item As New RadMenuItem("News", "~/News.aspx")

RadMenu1.Items.Add(item)

Remarks

Use this constructor to create and initialize a new instance of the RadMenuItem class using the specified text and URL.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members
Overload List

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Class Methods

RadMenuItem Class Methods
[image]
Telerik.WebControls Namespace : RadMenuItem Class

For a list of all members of this type, see RadMenuItem members.

Public Methods

 | Name | Description
Public Method | ApplyStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ApplyStyleSheetSkin | (Inherited from System.Web.UI.Control)
Public Method | Clone | Creates a copy of the current RadMenuItem object.
Public Method | CopyBaseAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | DataBind | (Inherited from System.Web.UI.Control)
Public Method | Dispose | (Inherited from System.Web.UI.Control)
Public Method | FindControl | (Inherited from System.Web.UI.Control)
Public Method | Focus | (Inherited from System.Web.UI.Control)
Public Method | HasControls | (Inherited from System.Web.UI.Control)
Public Method | HighlightPath |
Public Method | MergeStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | RenderControl | (Inherited from System.Web.UI.Control)
Public Method | RenderEndTag | (Inherited from System.Web.UI.WebControls.WebControl)
Public Method | ResolveClientUrl | (Inherited from System.Web.UI.Control)
Public Method | ResolveUrl | (Inherited from System.Web.UI.Control)
Public Method | SetRenderMethodDelegate | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenuItem Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Clone Method

Clone Method
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Clone Method

Creates a copy of the current RadMenuItem object.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function Clone() As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As RadMenuItem

value = instance.Clone()
C#
public RadMenuItem Clone()

Return Value

A RadMenuItem which is a copy of the current one.

Remarks

Use the Clone method to create a copy of the current item. All properties of the clone are set to the same values as the current ones. Child items are not cloned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


HighlightPath Method

HighlightPath Method
[image]
Telerik.WebControls Namespace > RadMenuItem Class : HighlightPath Method

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub HighlightPath()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem

instance.HighlightPath()
C#
public void HighlightPath()

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Class Properties

RadMenuItem Class Properties
[image]
Telerik.WebControls Namespace : RadMenuItem Class

For a list of all members of this type, see RadMenuItem members.

Public Properties

 | Name | Description
Public Property | AccessKey | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | AppRelativeTemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Attributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BackColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | BorderWidth | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ClickedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is clicked.
Public Property | ClientID | (Inherited from System.Web.UI.Control)
Public Property | Controls | (Inherited from System.Web.UI.Control)
Public Property | ControlStyle | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ControlStyleCreated | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | DataItem | Gets or sets the data item represented by the item.
Public Property | DisabledCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is disabled.
Public Property | DisabledImageUrl | Gets or sets the path to an image to display when the items is disabled.
Public Property | EnableTheming | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | EnableViewState | (Inherited from System.Web.UI.Control)
Public Property | ExpandedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible).
Public Property | ExpandedImageUrl | Gets or sets the path to an image to display when the items is expanded.
Public Property | FocusedCssClass | Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is focused.
Public Property | Font | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ForeColor | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | GroupSettings | Specifies the settings for child item behavior.
Public Property | HasAttributes | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Height | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | ID | Overridden. This property is being used internally by the RadMenu control. Setting it may lead to unpredictable results.
Public Property | ImageClickedUrl | Gets or sets the path to an image to display for the item when the user clicks the item.
Public Property | ImageOverUrl | Gets or sets the path to an image to display for the item when the user moves the mouse over the item.
Public Property | ImageUrl | Gets or sets the path to an image to display for the item.
Public Property | Index | Gets the zero based index of the item in the Items collection of its parent.
Public Property | IsSeparator | Sets or gets whether the item is separator. It also represents a logical state of the item. Might be used in some applications for keyboard navigation to omit processing items that are marked as separators.
Public Property | Items | Gets the collection of child items in the menu item.
Public Property | ItemTemplate | Gets or sets the template for displaying the item.
Public Property | Level | Manages the item level of a particular Item instance. This property allows easy implementation/separation of the menu items in levels.
Public Property | Menu | Gets the RadMenu instance which contains the item.
Public Property | NamingContainer | (Inherited from System.Web.UI.Control)
Public Property | NavigateUrl | Gets or sets the URL to link to when the item is clicked.
Public Property | Owner | Gets the IRadMenuItemContainer which contains the item.
Public Property | Page | (Inherited from System.Web.UI.Control)
Public Property | Parent | (Inherited from System.Web.UI.Control)
Public Property | PostBack | Gets or sets a value indicating whether clicking on the item will postback.
Public Property | Site | (Inherited from System.Web.UI.Control)
Public Property | SkinID | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Style | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | TabIndex | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | Target | Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.
Public Property | TemplateControl | (Inherited from System.Web.UI.Control)
Public Property | TemplateSourceDirectory | (Inherited from System.Web.UI.Control)
Public Property | Text | Gets or sets the text caption for the menu item.
Public Property | ToolTip | (Inherited from System.Web.UI.WebControls.WebControl)
Public Property | UniqueID | (Inherited from System.Web.UI.Control)
Public Property | Value | Gets or sets the value associated with the menu item.
Public Property | Width | (Inherited from System.Web.UI.WebControls.WebControl)
Top

See Also

Reference

RadMenuItem Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ClickedCssClass Property

ClickedCssClass Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ClickedCssClass Property

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ClickedCssClass As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ClickedCssClass = value

value = instance.ClickedCssClass
C#
public string ClickedCssClass {get; set;}

Return Value

The CSS class applied when the menu item is clicked. The default value is "clicked".

Example

By default the visual appearance of clicked menu items is defined in the skin CSS file. You can use the ClickedCssClass property to specify unique appearance for the menu item when it is clicked.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


DataItem Property

DataItem Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItem Class : DataItem Property

Gets or sets the data item represented by the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property DataItem As Object
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As Object

instance.DataItem = value

value = instance.DataItem
C#
public virtual object DataItem {get; set;}

Return Value

An object representing the data item to which the Item is bound to. The DataItem property will always return null when accessed outside of MenuItemDataBound event handler.

Example

The following example demonstrates how to map fields from the data item to RadMenuItem properties. It assumes the user has subscribed to the MenuItemDataBoundevent.:E:Telerik.WebControls.RadMenu.ItemDataBoundRadMenuItem
C# Copy Code
private void RadMenu1_MenuItemDataBound(object sender, Telerik.WebControls.ItemStripEventArgs e)
{
   RadMenuItem item = e.Item;
   DataRowView dataRow = (DataRowView) e.Item.DataItem;

   item.ImageUrl = "image" + dataRow["ID"].ToString() + ".gif";
   item.NavigateUrl = dataRow["URL"].ToString();
}

Visual Basic Copy Code
Sub RadMenu1_MenuItemDataBound(ByVal sender As Object, ByVal e As ItemStripEventArgs) Handles RadMenu1.MenuItemDataBound
    Dim item As RadMenuItem = e.Item
    Dim dataRow As DataRowView = CType(e.Item.DataItem, DataRowView)

    item.ImageUrl = "image" + dataRow("ID").ToString() + ".gif"
    item.NavigateUrl = dataRow("URL").ToString()
End Sub

Remarks

This property is applicable only during data binding. Use it along with the MenuItemDataBound event to perform additional mapping of fields from the data item to RadMenuItem properties.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


DisabledCssClass Property

DisabledCssClass Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : DisabledCssClass Property

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is disabled.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property DisabledCssClass As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.DisabledCssClass = value

value = instance.DisabledCssClass
C#
public string DisabledCssClass {get; set;}

Return Value

The CSS class applied when the menu item is disabled. The default value is "disabled".

Remarks

By default the visual appearance of disabled menu items is defined in the skin CSS file. You can use the DisabledCssClass property to specify unique appearance for the menu item when it is disabled.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


DisabledImageUrl Property

DisabledImageUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : DisabledImageUrl Property

Gets or sets the path to an image to display when the items is disabled.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property DisabledImageUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.DisabledImageUrl = value

value = instance.DisabledImageUrl
C#
public string DisabledImageUrl {get; set;}

Return Value

The path to the image to display when the item is disabled. The default value is empty string.

Example

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif" DisabledImageUrl="~/Img/inboxDisabled.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif" DisabledImageUrl="~/Img/outboxDisabled.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the DisabledImageUrl property to specify the image that will be used when the item is disabled. If the DisabledImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ExpandedCssClass Property

ExpandedCssClass Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ExpandedCssClass Property

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is opened (its child items are visible).

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ExpandedCssClass As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ExpandedCssClass = value

value = instance.ExpandedCssClass
C#
public string ExpandedCssClass {get; set;}

Return Value

The CSS class applied when the menu item is opened. The default value is "expanded".

Remarks

By default the visual appearance of opened menu items is defined in the skin CSS file. You can use the ExpandedCssClass property to specify unique appearance for the menu item when it is opened.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ExpandedImageUrl Property

ExpandedImageUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ExpandedImageUrl Property

Gets or sets the path to an image to display when the items is expanded.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ExpandedImageUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ExpandedImageUrl = value

value = instance.ExpandedImageUrl
C#
public string ExpandedImageUrl {get; set;}

Return Value

The path to the image to display when the item is expanded. The default value is empty string.

Example

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif" ExpandedImageUrl="~/Img/inboxExpanded.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif" ExpandedImageUrl="~/Img/outboxExpanded.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the ExpandedImageUrl property to specify the image that will be used when the item is expanded. If the ExpandedImageUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


FocusedCssClass Property

FocusedCssClass Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : FocusedCssClass Property

Gets or sets the Cascading Style Sheet (CSS) class applied when the menu item is focused.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property FocusedCssClass As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.FocusedCssClass = value

value = instance.FocusedCssClass
C#
public string FocusedCssClass {get; set;}

Return Value

The CSS class applied when the menu item is focused. The default value is "focused".

Remarks

By default the visual appearance of focused menu items is defined in the skin CSS file. You can use the FocusedCssClass property to specify unique appearance for the menu item when it is focused.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


GroupSettings Property

GroupSettings Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : GroupSettings Property

Specifies the settings for child item behavior.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property GroupSettings As RadMenuItemGroupSettings
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As RadMenuItemGroupSettings

value = instance.GroupSettings
C#
public RadMenuItemGroupSettings GroupSettings {get;}

Return Value

An instance of the MenuItemGroupSettings class.

Remarks

You can customize the following settings

  • item flow
  • expand direction
  • horizontal offset from the parent item
  • vertical offset from the parent item
  • width
  • height

For more information check MenuItemGroupSettings.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ID Property

ID Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ID Property

This property is being used internally by the RadMenu control. Setting it may lead to unpredictable results.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overrides Public Property ID As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ID = value

value = instance.ID
C#
public override string ID {get; set;}

Remarks

The ID property is used internally. Use the Value property to store any item related data.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ImageClickedUrl Property

ImageClickedUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ImageClickedUrl Property

Gets or sets the path to an image to display for the item when the user clicks the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageClickedUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ImageClickedUrl = value

value = instance.ImageClickedUrl
C#
public string ImageClickedUrl {get; set;}

Return Value

The path to the image to display when the user clicks the item. The default value is empty string.

Example

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif" ImageClickedUrl="~/Img/inboxClicked.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif" ImageClickedUrl="~/Img/outboxClicked.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the ImageClickedUrl property to specify the image that will be used when the user clicks the item. If the ImageClickedUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ImageOverUrl Property

ImageOverUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ImageOverUrl Property

Gets or sets the path to an image to display for the item when the user moves the mouse over the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageOverUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ImageOverUrl = value

value = instance.ImageOverUrl
C#
public string ImageOverUrl {get; set;}

Return Value

The path to the image to display when the user moves the mouse over the item. The default value is empty string.

Example

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif"
                ImageOverUrl="~/Img/inboxOver.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif"
                ImageOverUrl="~/Img/outboxOver.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the ImageOverUrl property to specify the image that will be used when the user moves the mouse over the item. If the ImageOverUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ImageUrl Property

ImageUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ImageUrl Property

Gets or sets the path to an image to display for the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.ImageUrl = value

value = instance.ImageUrl
C#
public string ImageUrl {get; set;}

Return Value

The path to the image to display for the item. The default value is empty string.

Example

The following example demonstrates how to specify the image to display for the item using the ImageUrl property.

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the ImageUrl property to specify the image for the item. If the ImageUrl property is set to empty string no image will be rendered. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Index Property

Index Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Index Property

Gets the zero based index of the item in the Items collection of its parent.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Index As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As Integer

value = instance.Index
C#
public int Index {get;}

Return Value

An integer specifying the zero based index of the item considering the RadMenuItemCollection that contains it.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


IsSeparator Property

IsSeparator Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : IsSeparator Property

Sets or gets whether the item is separator. It also represents a logical state of the item. Might be used in some applications for keyboard navigation to omit processing items that are marked as separators.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property IsSeparator As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As Boolean

instance.IsSeparator = value

value = instance.IsSeparator
C#
public bool IsSeparator {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Items Property

Items Property
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Items Property

Gets the collection of child items in the menu item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Items As RadMenuItemCollection
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As RadMenuItemCollection

value = instance.Items
C#
public RadMenuItemCollection Items {get;}

Return Value

A RadMenuItemCollection that represents the children within the menu item. The default is empty collection.

Example

The following example demonstrates how to programmatically add child items.
C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   if (!Page.IsPostBack)
   {
       RadMenuItem newsItem = new RadMenuItem("News");
       RadMenu1.Items.Add(newsItem);

       RadMenuItem cnnItem = new RadMenuItem("CNN");
       newsItem.Items.Add(cnnItem);

       RadMenuItem nbcItem = new RadMenuItem("NBC");
       newsItem.Items.Add(nbcItem);
   }
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        Dim newsItem As RadMenuItem = New RadMenuItem("News")
        RadMenu1.Items.Add(newsItem)

        Dim cnnItem As RadMenuItem = New RadMenuItem("CNN")
        newsItem.Items.Add(cnnItem)

        Dim nbcItem As RadMenuItem = New RadMenuItem("NBC")
        newsItem.Items.Add(nbcItem)
    End If
End Sub

Remarks

Use this property to retrieve the child items of the menu item. You can also use it to programmatically add or remove child items.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


ItemTemplate Property

ItemTemplate Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : ItemTemplate Property

Gets or sets the template for displaying the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Property ItemTemplate As ITemplate
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As ITemplate

instance.ItemTemplate = value

value = instance.ItemTemplate
C#
public virtual ITemplate ItemTemplate {get; set;}

Return Value

A ITemplate implemented object that contains the template for displaying the item. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

To specify common display for all menu items use the ItemTemplate property of the RadMenu class.

Example

The following template demonstrates how to add a Calendar control in certain menu item.

ASPX:

<radM:RadMenu runat="server" ID="RadMenu1">

<Items>

<radM:RadMenuItem Text="Date">

<Items>

<radM:RadMenuItem Text="SelectDate">

<ItemTemplate>

<asp:Calendar runat="server" ID="Calendar1" />

</ItemTemplate>

</radM:RadMenuItem>

</Items>

</radM:RadMenuItem>

</Items>

</radM:RadMenu>

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Level Property

Level Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Level Property

Manages the item level of a particular Item instance. This property allows easy implementation/separation of the menu items in levels.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Level As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As Integer

value = instance.Level
C#
public int Level {get;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Menu Property

Menu Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Menu Property

Gets the RadMenu instance which contains the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Menu As RadMenu
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As RadMenu

value = instance.Menu
C#
public RadMenu Menu {get;}

Remarks

Use this property to obtain an instance to the RadMenu object containing the item.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


NavigateUrl Property

NavigateUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : NavigateUrl Property

Gets or sets the URL to link to when the item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property NavigateUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.NavigateUrl = value

value = instance.NavigateUrl
C#
public string NavigateUrl {get; set;}

Return Value

The URL to link to when the item is clicked. The default value is empty string.

Example

The following example demonstrates how to use the NavigateUrl property

<radM:RadMenu id="RadMenu1" runat="server">
<Items>
<radM:RadMenuItem Text="News" NavigateUrl="~/News.aspx" />
<radM:RadMenuItem Text="External URL" NavigateUrl="http://www.example.com" />
</Items>
</radM:RadMenu>

Remarks

Use the NavigateUrl property to specify the URL to link to when the item is clicked. Use "~" (tilde) in front of an URL within the same ASP.NET application. When specifying external URL do not forget the protocol (e.g. "http://").

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Owner Property

Owner Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Owner Property

Gets the IRadMenuItemContainer which contains the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Owner As IRadMenuItemContainer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As IRadMenuItemContainer

instance.Owner = value

value = instance.Owner
C#
public IRadMenuItemContainer Owner {get; set;}

Return Value

The object which contains the item. It might be an instance of the RadMenu class or the RadMenuItem class depending on the hierarchy level.

Remarks

The value is of the IRadMenuItemContainer type which is implemented by the RadMenu class and the RadMenuItem class. Use the Owner property when recursively traversing RadMenu.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


PostBack Property

PostBack Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : PostBack Property

Gets or sets a value indicating whether clicking on the item will postback.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property PostBack As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As Boolean

instance.PostBack = value

value = instance.PostBack
C#
public bool PostBack {get; set;}

Return Value

True if the menu item should postback; otherwise false. By default all the items will postback provided the user has subscribed to the ItemClick event.

Remarks

If you subscribe to the ItemClick all menu items will postback. To turn off that behavior you should set the PostBack property to false. This property cannot be set in design time.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Target Property

Target Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Target Property

Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Target As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.Target = value

value = instance.Target
C#
public string Target {get; set;}

Return Value

The target window or frame to load the Web page linked to when the Item is selected. Values must begin with a letter in the range of a through z (case insensitive), except for the following special values, which begin with an underscore:

_blank_parent_self_top

The default value is empty string.

Example

The following example demonstrates how to use the Target property

ASPX:

<radM:RadMenu runat="server" ID="RadMenu1">

<Items>

<radM:RadMenuItem Target="_blank" NavigateUrl="http://www.google.com" />

</Items>

</radM:RadMenu>

Remarks

Use the Target property to specify the frame or window that displays the Web page linked to when the menu item is clicked. The Web page is specified by setting the NavigateUrl property.

If this property is not set, the Web page specified by the NavigateUrl property is loaded in the current window.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Text Property

Text Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Text Property

Gets or sets the text caption for the menu item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
<LocalizableAttribute(True)>
Public Property Text As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.Text = value

value = instance.Text
C#
[LocalizableAttribute(true)]
public string Text {get; set;}

Return Value

The text of the item. The default value is empty string.

Example

This example demonstrates how to set the text of the item using the Text property.

<radM:RadMenu ID="RadMenu1" runat="server">
<Items>
<radM:RadMenuItem Text="News" />
<radM:RadMenuItem Text="News" />
</Items>
</radM:RadMenu>

Remarks

Use the Text property to specify the text to display for the item.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


Value Property

Value Property
[image]
Telerik.WebControls Namespace > RadMenuItem Class : Value Property

Gets or sets the value associated with the menu item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
<LocalizableAttribute(True)>
Public Property Value As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItem
Dim value As String

instance.Value = value

value = instance.Value
C#
[LocalizableAttribute(true)]
public string Value {get; set;}

Return Value

The value associated with the item. The default value is empty string.

Remarks

Use the Value property to specify or determine the value associated with the item.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItem Class
RadMenuItem Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBinding Class

RadMenuItemBinding Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuItemBinding Class

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class RadMenuItemBinding
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
C#
public sealed class RadMenuItemBinding

Inheritance Hierarchy

System.Object
Telerik.WebControls.RadMenuItemBinding

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuItemBinding Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBinding Class Members

RadMenuItemBinding Class Members
See Also Properties Methods
[image]
Telerik.WebControls Namespace : RadMenuItemBinding Class

The following tables list the members exposed by RadMenuItemBinding.

Public Constructors

 | Name | Description
Public Constructor | RadMenuItemBinding Constructor |
Top

Public Properties

 | Name | Description
Public Property | DataMember | Gets or sets the data member to bind to a menu item.
Public Property | Depth | Gets or sets the menu depth to which the RadMenuItemBinding object is applied.
Public Property | Enabled | Gets or sets a value indicating whether the menu item is enabled.
Public Property | EnabledField | Gets or sets the name of the field from the data source to bind to the Enabled property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | FormatString | Gets or sets the string that specifies the display format for the text of a menu item to which the RadMenuItemBinding object is applied.
Public Property | ImageOverUrl | Gets or sets the path to an image to display for the item when the user moves the mouse over the item.
Public Property | ImageOverUrlField | Gets or sets the name of the field from the data source to bind to the ImageOverUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | ImageUrl | Gets or sets the URL to an image that is displayed next to the text of a menu item to which the RadMenuItemBinding object is applied.
Public Property | ImageUrlField | Gets or sets the name of the field from the data source to bind to the ImageUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | NavigateUrl | Gets or sets the URL to link to when the item is clicked.
Public Property | NavigateUrlField | Gets or sets the name of the field from the data source to bind to the NavigateUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Target | Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.
Public Property | TargetField | Gets or sets the name of the field from the data source to bind to the Target property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Text | Gets or sets the text caption for the item.
Public Property | TextField | Gets or sets the name of the field from the data source to bind to the Text property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | ToolTip | Gets or sets the ToolTip text for a menu item to which the RadMenuItemBinding object is applied.
Public Property | ToolTipField | Gets or sets the name of the field from the data source to bind to the ToolTip property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Value | Gets or sets the value associated with the item.
Public Property | ValueField | Gets or sets the name of the field from the data source to bind to the Value property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Top

Public Methods

 | Name | Description
Public Method | ToString | Overridden.
Top

See Also

Reference

RadMenuItemBinding Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBinding Constructor

RadMenuItemBinding Constructor
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : RadMenuItemBinding Constructor

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding()
C#
public RadMenuItemBinding()

Syntax

Visual Basic (Declaration)
Public Function New()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding()
C#
public RadMenuItemBinding()

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBinding Class Methods

RadMenuItemBinding Class Methods
[image]
Telerik.WebControls Namespace : RadMenuItemBinding Class

For a list of all members of this type, see RadMenuItemBinding members.

Public Methods

 | Name | Description
Public Method | ToString | Overridden.
Top

See Also

Reference

RadMenuItemBinding Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ToString Method

ToString Method
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ToString Method

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overrides Public NotOverridable Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

value = instance.ToString()
C#
public override string ToString()

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBinding Class Properties

RadMenuItemBinding Class Properties
[image]
Telerik.WebControls Namespace : RadMenuItemBinding Class

For a list of all members of this type, see RadMenuItemBinding members.

Public Properties

 | Name | Description
Public Property | DataMember | Gets or sets the data member to bind to a menu item.
Public Property | Depth | Gets or sets the menu depth to which the RadMenuItemBinding object is applied.
Public Property | Enabled | Gets or sets a value indicating whether the menu item is enabled.
Public Property | EnabledField | Gets or sets the name of the field from the data source to bind to the Enabled property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | FormatString | Gets or sets the string that specifies the display format for the text of a menu item to which the RadMenuItemBinding object is applied.
Public Property | ImageOverUrl | Gets or sets the path to an image to display for the item when the user moves the mouse over the item.
Public Property | ImageOverUrlField | Gets or sets the name of the field from the data source to bind to the ImageOverUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | ImageUrl | Gets or sets the URL to an image that is displayed next to the text of a menu item to which the RadMenuItemBinding object is applied.
Public Property | ImageUrlField | Gets or sets the name of the field from the data source to bind to the ImageUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | NavigateUrl | Gets or sets the URL to link to when the item is clicked.
Public Property | NavigateUrlField | Gets or sets the name of the field from the data source to bind to the NavigateUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Target | Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.
Public Property | TargetField | Gets or sets the name of the field from the data source to bind to the Target property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Text | Gets or sets the text caption for the item.
Public Property | TextField | Gets or sets the name of the field from the data source to bind to the Text property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | ToolTip | Gets or sets the ToolTip text for a menu item to which the RadMenuItemBinding object is applied.
Public Property | ToolTipField | Gets or sets the name of the field from the data source to bind to the ToolTip property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Public Property | Value | Gets or sets the value associated with the item.
Public Property | ValueField | Gets or sets the name of the field from the data source to bind to the Value property of a RadMenuItem object to which the RadMenuItemBinding object is applied.
Top

See Also

Reference

RadMenuItemBinding Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


DataMember Property

DataMember Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : DataMember Property

Gets or sets the data member to bind to a menu item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property DataMember As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.DataMember = value

value = instance.DataMember
C#
public string DataMember {get; set;}

Remarks

When creating a RadMenuItemBinding object, you must specify the criteria for binding. The criteria indicate when a data item should be bound to a menu item. You can specify the Depth property, the DataMember property, or both.

When the data source contains multiple elements or tables, use the DataMember property to specify the element or table to bind to a menu item. A data member specifies the type of the data item in the underlying data source, but can represent different information depending on the data source. Each data item in a hierarchical data source exposes a IHierarchyData.Type property, which specifies the type of the data item. For example, the data member for an XML element specifies the name of the element. The following RadMenuItemBinding declaration binds the

<Book>
elements of an XmlDataSource control to all the menu items in the menu, regardless of the location in the hierarchy:

            <asp:RadMenuItemBinding DataMember="Book" TextField="Title" ValueField= "ISBN">

Sometimes you might need to create a menu item binding that specifies both a depth and a data member. This is often used when the data source contains items at different levels that have the same data member value. For example, you can have

<Item>
elements that appear at different levels within an XML file. The following RadMenuItemBinding declarations show how to specify menu item bindings that apply to identical data members at different menu depths:

<asp:RadMenuItemBinding DataMember="Item" Depth="1" TextField="Title">

<asp:RadMenuItemBinding DataMember="Item" Depth="2" TextField="ISBN">

If a menu item binding is defined without a depth or a data member, the menu item binding is applied to all menu items within the menu. This is commonly used when all data items have the same properties and should be displayed identically, regardless of the menu depth.

After the binding criteria are established, you can then bind a property of a RadMenuItem object that can be bound to a value. You can bind to a field of a data item or to a static value. When bound to a static value, all RadMenuItem objects to which the RadMenuItemBinding object is applied share the same value. Properties bound to fields contain the values of the field from the data source.

If conflicting RadMenuItemBinding objects are defined, the Menu control applies the menu item bindings in the following order of precedence:

  1. The RadMenuItemBinding object that defines and matches both a depth and a data member.

  2. The RadMenuItemBinding object that defines and matches the data member only.

  3. The RadMenuItemBinding object that defines and matches the depth only.

  4. The RadMenuItemBinding object that defines neither the depth nor the data member. (This type of menu item binding is applied to all menu items in the menu.)

  5. The RadMenuItemBinding object that does not have a match in the data source. In this case, the value returned by the ToString() method of the data item is then bound to the Text and Value properties of the menu items to which the RadMenuItemBinding object is applied.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


Depth Property

Depth Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : Depth Property

Gets or sets the menu depth to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Depth As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As Integer

instance.Depth = value

value = instance.Depth
C#
public int Depth {get; set;}

Remarks

When creating a RadMenuItemBinding object, you must specify the criteria for binding. The criteria indicate when a data item should be bound to a menu item. You can specify the Depth property, the DataMember property, or both.

Use the Depth property to specify the menu depth at which to apply the RadMenuItemBinding object. For example, the following RadMenuItemBinding declaration binds the Name and ID fields of the data source to the Text and Value properties, respectively, of all menu items with a depth of 0:

            <asp:RadMenuItemBinding Depth="0" TextField="Name" ValueField="ID">

Sometimes you might need to create a menu item binding that specifies both a depth and a data member. This is often used when the data source contains items at different levels that have the same data member value. For example, you can have
<Item> elements that appear at different levels within an XML file. The following RadMenuItemBinding declarations show how to specify menu item bindings that apply to identical data members at different menu depths:

    <asp:RadMenuItemBinding DataMember="Item" Depth="1" TextField="Title">
    <asp:RadMenuItemBinding DataMember="Item" Depth="2" TextField="ISBN">

If a menu item binding is defined without a depth and a data member, the menu item binding is applied to all menu items within the menu. This is commonly used when all data items have the same properties and should be displayed identically, regardless of the menu depth.

After the binding criteria are established, you can then bind a property of a RadMenuItem object that can be bound to a value. You can bind to a field of a data item or to a static value. When bound to a static value, all RadMenuItem objects to which the RadMenuItemBinding object is applied share the same value. Properties bound to fields contain the values of the field from the data source.

If conflicting RadMenuItemBinding objects are defined, the Menu control applies the menu item bindings in the following order of precedence:

  1. The RadMenuItemBinding object that defines and matches both a depth and a data member.

  2. The RadMenuItemBinding object that defines and matches the data member only.

  3. The RadMenuItemBinding object that defines and matches the depth only.

  4. The RadMenuItemBinding object that defines neither the depth nor the data member. (This type of menu item binding is applied to all menu items in the menu.)

  5. The RadMenuItemBinding object that does not have a match in the data source. In this case, the value returned by the ToString() method of the data item is then bound to the Text and Value properties of the menu items to which the RadMenuItemBinding object is applied.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


Enabled Property

Enabled Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : Enabled Property

Gets or sets a value indicating whether the menu item is enabled.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Enabled As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As Boolean

instance.Enabled = value

value = instance.Enabled
C#
public bool Enabled {get; set;}

Remarks

Use the Enabled property to specify or determine whether a menu item is functional. When set to false, the item appears dimmed.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


EnabledField Property

EnabledField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : EnabledField Property

Gets or sets the name of the field from the data source to bind to the Enabled property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property EnabledField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.EnabledField = value

value = instance.EnabledField
C#
public string EnabledField {get; set;}

Return Value

The name of the field from the data source to bind to the Enabled of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


FormatString Property

FormatString Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : FormatString Property

Gets or sets the string that specifies the display format for the text of a menu item to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
<LocalizableAttribute(True)>
Public Property FormatString As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.FormatString = value

value = instance.FormatString
C#
[LocalizableAttribute(true)]
public string FormatString {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ImageOverUrl Property

ImageOverUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ImageOverUrl Property

Gets or sets the path to an image to display for the item when the user moves the mouse over the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageOverUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ImageOverUrl = value

value = instance.ImageOverUrl
C#
public string ImageOverUrl {get; set;}

Return Value

The path to the image to display when the user moves the mouse over the item. The default value is empty string.

Example

<radm:RadMenu id="RadMenu1" runat="server">
<Items>
<radm:RadMenuItem ImageUrl="~/Img/inbox.gif"
                ImageOverUrl="~/Img/inboxOver.gif" Text="Index" />
<radm:RadMenuItem ImageUrl="~/Img/outbox.gif"
                ImageOverUrl="~/Img/outboxOver.gif" Text="Outbox" />
</Items>
</radm:RadMenu>

Remarks

Use the ImageOverUrl property to specify the image that will be used when the user moves the mouse over the item. If the ImageOverUrl property is set to empty string the image specified by the ImageUrl property will be used. Use "~" (tilde) when referring to images within the current ASP.NET application.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ImageOverUrlField Property

ImageOverUrlField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ImageOverUrlField Property

Gets or sets the name of the field from the data source to bind to the ImageOverUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageOverUrlField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ImageOverUrlField = value

value = instance.ImageOverUrlField
C#
public string ImageOverUrlField {get; set;}

Return Value

The name of the field from the data source to bind to the ImageOverUrl of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ImageUrl Property

ImageUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ImageUrl Property

Gets or sets the URL to an image that is displayed next to the text of a menu item to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ImageUrl = value

value = instance.ImageUrl
C#
public string ImageUrl {get; set;}

Return Value

The URL to an image that is displayed next to the text of a menu item to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Remarks

This image is shared with all RadMenuItem objects to which the RadMenuItemBinding object is applied.

NOTE: You can override the image for an individual menu item by setting its ImageUrl property directly.

Instead of using this property to display the same image in each menu item, you can also use the ImageUrlField property to bind the ImageUrl property of a RadMenuItem object to a field of a data source. When rendered, the ImageUrl property of each menu item to which the RadMenuItemBinding object is applied contains the corresponding value from the field.

NOTE: If the ImageUrl and ImageUrlField properties are both set, the ImageUrlField property takes precedence.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ImageUrlField Property

ImageUrlField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ImageUrlField Property

Gets or sets the name of the field from the data source to bind to the ImageUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ImageUrlField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ImageUrlField = value

value = instance.ImageUrlField
C#
public string ImageUrlField {get; set;}

Return Value

The name of the field from the data source to bind to the ImageUrl of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Remarks

If the data source contains multiple tables or attributes, you must first establish the binding criteria by setting the Depth property, the DataMember property, or both.

Instead of using this property to bind the ImageUrl property of a RadMenuItem object to a field, you can also bind it to a static value by setting the RadMenuItemBinding.ImageUrl property. This allows you to display the same image in each menu item to which the RadMenuItemBinding object is applied.

NOTE:

If the ImageUrl and ImageUrlField properties are both set, the ImageUrlField property takes precedence.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


NavigateUrl Property

NavigateUrl Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : NavigateUrl Property

Gets or sets the URL to link to when the item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property NavigateUrl As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.NavigateUrl = value

value = instance.NavigateUrl
C#
public string NavigateUrl {get; set;}

Return Value

The URL to link to when the item is clicked. The default value is empty string.

Example

The following example demonstrates how to use the NavigateUrl property

<radM:RadMenu id="RadMenu1" runat="server">
<Items>
<radM:RadMenuItem Text="News" NavigateUrl="~/News.aspx" />
<radM:RadMenuItem Text="External URL" NavigateUrl="http://www.example.com" />
</Items>
</radM:RadMenu>

Remarks

Use the NavigateUrl property to specify the URL to link to when the item is clicked. Use "~" (tilde) in front of an URL within the same ASP.NET application. When specifying external URL do not forget the protocol (e.g. "http://").

Specifying NavigateUrl or NavigateUrlField will override the values populated from the DataNavigateUrlField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


NavigateUrlField Property

NavigateUrlField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : NavigateUrlField Property

Gets or sets the name of the field from the data source to bind to the NavigateUrl property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property NavigateUrlField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.NavigateUrlField = value

value = instance.NavigateUrlField
C#
public string NavigateUrlField {get; set;}

Return Value

The name of the field from the data source to bind to the NavigateUrl of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Remarks

Specifying NavigateUrl or NavigateUrlField will override the values populated from the DataNavigateUrlField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


Target Property

Target Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : Target Property

Gets or sets the target window or frame to display the Web page content linked to when the menu item is clicked.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Target As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.Target = value

value = instance.Target
C#
public string Target {get; set;}

Return Value

The target window or frame to load the Web page linked to when the Item is selected. Values must begin with a letter in the range of a through z (case insensitive), except for the following special values, which begin with an underscore:

_blank_parent_self_top

The default value is empty string.

Example

The following example demonstrates how to use the Target property

ASPX:

<radM:RadMenu runat="server" ID="RadMenu1">

<Items>

<radM:RadMenuItem Target="_blank" NavigateUrl="http://www.google.com" />

</Items>

</radM:RadMenu>

Remarks

Use the Target property to specify the frame or window that displays the Web page linked to when the menu item is clicked. The Web page is specified by setting the NavigateUrl property.

If this property is not set, the Web page specified by the NavigateUrl property is loaded in the current window.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


TargetField Property

TargetField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : TargetField Property

Gets or sets the name of the field from the data source to bind to the Target property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property TargetField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.TargetField = value

value = instance.TargetField
C#
public string TargetField {get; set;}

Return Value

The name of the field from the data source to bind to the Target of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


Text Property

Text Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : Text Property

Gets or sets the text caption for the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
<LocalizableAttribute(True)>
Public Property Text As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.Text = value

value = instance.Text
C#
[LocalizableAttribute(true)]
public string Text {get; set;}

Return Value

The text of the item. The default value is empty string.

Example

This example demonstrates how to set the text of the item using the Text property.

<radM:RadMenu ID="RadMenu1" runat="server">
<Items>
<radM:RadMenuItem Text="News" />
<radM:RadMenuItem Text="News" />
</Items>
</radM:RadMenu>

Remarks

Specifying Text or TextField will override the values populated from the DataTextField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


TextField Property

TextField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : TextField Property

Gets or sets the name of the field from the data source to bind to the Text property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property TextField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.TextField = value

value = instance.TextField
C#
public string TextField {get; set;}

Return Value

The name of the field from the data source to bind to the Text of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Remarks

Specifying Text or TextField will override the values populated from the DataTextField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ToolTip Property

ToolTip Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ToolTip Property

Gets or sets the ToolTip text for a menu item to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ToolTip As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ToolTip = value

value = instance.ToolTip
C#
public string ToolTip {get; set;}

Return Value

The ToolTip text for a menu item to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ToolTipField Property

ToolTipField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ToolTipField Property

Gets or sets the name of the field from the data source to bind to the ToolTip property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ToolTipField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ToolTipField = value

value = instance.ToolTipField
C#
public string ToolTipField {get; set;}

Return Value

The name of the field from the data source to bind to the ToolTip of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


Value Property

Value Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : Value Property

Gets or sets the value associated with the item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Value As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.Value = value

value = instance.Value
C#
public string Value {get; set;}

Return Value

The value associated with the item. The default value is empty string.

Remarks

Use the Value property to specify or determine the value associated with the item.

Specifying Value or ValueField will override the values populated from the DataValueField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


ValueField Property

ValueField Property
[image]
Telerik.WebControls Namespace > RadMenuItemBinding Class : ValueField Property

Gets or sets the name of the field from the data source to bind to the Value property of a RadMenuItem object to which the RadMenuItemBinding object is applied.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ValueField As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBinding
Dim value As String

instance.ValueField = value

value = instance.ValueField
C#
public string ValueField {get; set;}

Return Value

The name of the field from the data source to bind to the Value of a RadMenuItem to which the RadMenuItemBinding is applied. The default is an empty string (""), which indicates that this property is not set.

Remarks

Specifying Value or ValueField will override the values populated from the DataValueField property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBinding Class
RadMenuItemBinding Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBindingCollection Class

RadMenuItemBindingCollection Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuItemBindingCollection Class

Object Model

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class RadMenuItemBindingCollection
   Inherits StateManagedCollection
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
C#
public sealed class RadMenuItemBindingCollection : StateManagedCollection

Inheritance Hierarchy

System.Object
System.Web.UI.StateManagedCollection
Telerik.WebControls.RadMenuItemBindingCollection

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuItemBindingCollection Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBindingCollection Class Members

RadMenuItemBindingCollection Class Members
See Also Properties Methods
[image]
Telerik.WebControls Namespace : RadMenuItemBindingCollection Class

The following tables list the members exposed by RadMenuItemBindingCollection.

Public Properties

 | Name | Description
Public Property | Count | (Inherited from System.Web.UI.StateManagedCollection)
Public Property | Item |
Top

Public Methods

 | Name | Description
Public Method | Add |
Public Method | Clear | (Inherited from System.Web.UI.StateManagedCollection)
Public Method | Contains |
Public Method | CopyTo | Overloaded.
Public Method | GetEnumerator | (Inherited from System.Web.UI.StateManagedCollection)
Public Method | IndexOf |
Public Method | Insert |
Public Method | Remove |
Public Method | RemoveAt |
Public Method | SetDirty | (Inherited from System.Web.UI.StateManagedCollection)
Top

See Also

Reference

RadMenuItemBindingCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBindingCollection Class Methods

RadMenuItemBindingCollection Class Methods
[image]
Telerik.WebControls Namespace : RadMenuItemBindingCollection Class

For a list of all members of this type, see RadMenuItemBindingCollection members.

Public Methods

 | Name | Description
Public Method | Add |
Public Method | Clear | (Inherited from System.Web.UI.StateManagedCollection)
Public Method | Contains |
Public Method | CopyTo | Overloaded.
Public Method | GetEnumerator | (Inherited from System.Web.UI.StateManagedCollection)
Public Method | IndexOf |
Public Method | Insert |
Public Method | Remove |
Public Method | RemoveAt |
Public Method | SetDirty | (Inherited from System.Web.UI.StateManagedCollection)
Top

See Also

Reference

RadMenuItemBindingCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Add Method

Add Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : Add Method

binding

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function Add( _
   ByVal binding As RadMenuItemBinding _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim binding As RadMenuItemBinding
Dim value As Integer

value = instance.Add(binding)
C#
public int Add(
   RadMenuItemBinding binding
)

Parameters

binding

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


Contains Method

Contains Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : Contains Method

binding

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function Contains( _
   ByVal binding As RadMenuItemBinding _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim binding As RadMenuItemBinding
Dim value As Boolean

value = instance.Contains(binding)
C#
public bool Contains(
   RadMenuItemBinding binding
)

Parameters

binding

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


CopyTo Method

CopyTo Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : CopyTo Method

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Overload List

Overload | Description
CopyTo(RadMenuItemBinding[],Int32) |
CopyTo(Array,Int32) | (Inherited from System.Web.UI.StateManagedCollection)

Overload List

Overload | Description
CopyTo(RadMenuItemBinding[],Int32) |
CopyTo(Array,Int32) | (Inherited from System.Web.UI.StateManagedCollection)

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


CopyTo(RadMenuItemBinding[],Int32) Method

CopyTo(RadMenuItemBinding[],Int32) Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class > CopyTo Method : CopyTo(RadMenuItemBinding[],Int32) Method

array
index

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overloads Public Sub CopyTo( _
   ByVal array() As RadMenuItemBinding, _
   ByVal index As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim array() As RadMenuItemBinding
Dim index As Integer

instance.CopyTo(array, index)
C#
public void CopyTo(
   RadMenuItemBinding[] array,
   int index
)

Parameters

array
index

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members
Overload List

© 2002-2006, telerik. All Rights Reserved.


IndexOf Method

IndexOf Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : IndexOf Method

value

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function IndexOf( _
   ByVal value As RadMenuItemBinding _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim value As RadMenuItemBinding
Dim value As Integer

value = instance.IndexOf(value)
C#
public int IndexOf(
   RadMenuItemBinding value
)

Parameters

value

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


Insert Method

Insert Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : Insert Method

index
binding

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal binding As RadMenuItemBinding _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim index As Integer
Dim binding As RadMenuItemBinding

instance.Insert(index, binding)
C#
public void Insert(
   int index,
   RadMenuItemBinding binding
)

Parameters

index
binding

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


Remove Method

Remove Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : Remove Method

binding

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Remove( _
   ByVal binding As RadMenuItemBinding _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim binding As RadMenuItemBinding

instance.Remove(binding)
C#
public void Remove(
   RadMenuItemBinding binding
)

Parameters

binding

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


RemoveAt Method

RemoveAt Method
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : RemoveAt Method

index

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub RemoveAt( _
   ByVal index As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim index As Integer

instance.RemoveAt(index)
C#
public void RemoveAt(
   int index
)

Parameters

index

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemBindingCollection Class Properties

RadMenuItemBindingCollection Class Properties
[image]
Telerik.WebControls Namespace : RadMenuItemBindingCollection Class

For a list of all members of this type, see RadMenuItemBindingCollection members.

Public Properties

 | Name | Description
Public Property | Count | (Inherited from System.Web.UI.StateManagedCollection)
Public Property | Item |
Top

See Also

Reference

RadMenuItemBindingCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Item Property

Item Property
[image]
Telerik.WebControls Namespace > RadMenuItemBindingCollection Class : Item Property

i

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Default Property Item( _
   ByVal i As Integer _
) As RadMenuItemBinding
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemBindingCollection
Dim i As Integer
Dim value As RadMenuItemBinding

instance.Item(i) = value

value = instance.Item(i)
C#
public RadMenuItemBinding this[
   int i
]; {get; set;}

Parameters

i

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemBindingCollection Class
RadMenuItemBindingCollection Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemCollection Class

RadMenuItemCollection Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuItemCollection Class

A collection of RadMenuItem objects in a RadMenu control.

Object Model

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class RadMenuItemCollection
   Inherits CollectionBase
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
C#
public class RadMenuItemCollection : CollectionBase

Remarks

The RadMenuItemCollection class represents a collection of RadMenuItem objects. The RadMenuItem objects in turn represent menu items within a RadMenu control.

  • Use the indexer to programmatically retrieve a single RadMenuItem from the collection, using array notation.
  • Use the Count property to determine the total number of menu items in the collection.
  • Use the Add method to add menu items in the collection.
  • Use the Remove method to remove menu items from the collection.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Telerik.WebControls.RadMenuItemCollection

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuItemCollection Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemCollection Class Members

RadMenuItemCollection Class Members
See Also Properties Methods
[image]
Telerik.WebControls Namespace : RadMenuItemCollection Class

The following tables list the members exposed by RadMenuItemCollection.

Public Constructors

 | Name | Description
Public Constructor | RadMenuItemCollection Constructor | Initializes a new instance of the RadMenuItemCollection class.
Top

Public Properties

 | Name | Description
Public Property | Capacity | (Inherited from System.Collections.CollectionBase)
Public Property | Count | (Inherited from System.Collections.CollectionBase)
Public Property | Item | Gets a RadMenuItem at the specified index in the collection.
Top

Public Methods

 | Name | Description
Public Method | Add | Appends a RadMenuItem to the end of the collection.
Public Method | AddRange | Adds the items in an array of RadMenuItem objects to the collection.
Public Method | Clear | Removes all items from the collection.
Public Method | Contains | Determines whether the collection contains the specified item.
Public Method | FindItemByText | Searches the RadMenuItemCollection for the first RadMenuItem with a Text property equal to the specified value.
Public Method | FindItemByUrl | Searches the RadMenuItemCollection for the first Item with a NavigateUrl property equal to the specified value.
Public Method | FindItemByValue | Searches the RadMenuItemCollection for the first RadMenuItem with a Value property equal to the specified value.
Public Method | GetEnumerator | (Inherited from System.Collections.CollectionBase)
Public Method | IndexOf | Determines the index value that represents the position of the specified item in the collection.
Public Method | Insert | Inserts the specified RadMenuItem in the collection at the specified index location.
Public Method | Remove | Removes the specified item from the collection.
Public Method | RemoveAt | Removes the RadMenuItem at the specified index from the collection.
Top

See Also

Reference

RadMenuItemCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemCollection Constructor

RadMenuItemCollection Constructor
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : RadMenuItemCollection Constructor

owner
The owner of the collection.
Initializes a new instance of the RadMenuItemCollection class.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal owner As IRadMenuItemContainer _
)
Visual Basic (Usage) Copy Code
Dim owner As IRadMenuItemContainer

Dim instance As RadMenuItemCollection(owner)
C#
public RadMenuItemCollection(
   IRadMenuItemContainer owner
)

Syntax

Visual Basic (Declaration)
Public Function New( _
   ByVal owner As IRadMenuItemContainer _
)
Visual Basic (Usage) Copy Code
Dim owner As IRadMenuItemContainer

Dim instance As RadMenuItemCollection(owner)
C#
public RadMenuItemCollection(
   IRadMenuItemContainer owner
)

Parameters

owner
The owner of the collection.

Remarks

Use the constructor to create a new RadMenuItemCollection class.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemCollection Class Methods

RadMenuItemCollection Class Methods
[image]
Telerik.WebControls Namespace : RadMenuItemCollection Class

For a list of all members of this type, see RadMenuItemCollection members.

Public Methods

 | Name | Description
Public Method | Add | Appends a RadMenuItem to the end of the collection.
Public Method | AddRange | Adds the items in an array of RadMenuItem objects to the collection.
Public Method | Clear | Removes all items from the collection.
Public Method | Contains | Determines whether the collection contains the specified item.
Public Method | FindItemByText | Searches the RadMenuItemCollection for the first RadMenuItem with a Text property equal to the specified value.
Public Method | FindItemByUrl | Searches the RadMenuItemCollection for the first Item with a NavigateUrl property equal to the specified value.
Public Method | FindItemByValue | Searches the RadMenuItemCollection for the first RadMenuItem with a Value property equal to the specified value.
Public Method | GetEnumerator | (Inherited from System.Collections.CollectionBase)
Public Method | IndexOf | Determines the index value that represents the position of the specified item in the collection.
Public Method | Insert | Inserts the specified RadMenuItem in the collection at the specified index location.
Public Method | Remove | Removes the specified item from the collection.
Public Method | RemoveAt | Removes the RadMenuItem at the specified index from the collection.
Top

See Also

Reference

RadMenuItemCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Add Method

Add Method
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Add Method

item
Appends a RadMenuItem to the end of the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Add( _
   ByVal item As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim item As RadMenuItem

instance.Add(item)
C#
public void Add(
   RadMenuItem item
)

Parameters

item

Example

The following example demonstrates how to programmatically add items in a RadMenu control.

C# Copy Code
RadMenuItem newsItem = new RadMenuItem("News");

RadMenu1.Items.Add(newsItem);

Visual Basic Copy Code
Dim newsItem As RadMenuItem = New RadMenuItem("News")

RadMenu1.Items.Add(newsItem)

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


AddRange Method

AddRange Method
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : AddRange Method

items
Adds the items in an array of RadMenuItem objects to the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub AddRange( _
   ByVal items() As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim items() As RadMenuItem

instance.AddRange(items)
C#
public void AddRange(
   RadMenuItem[] items
)

Parameters

items

Example

The following example demonstrates how to use the AddRange method to add multiple items in a single step.
C# Copy Code
void Page_Load(object sender, EventArgs e)
{
   if (!Page.IsPostBack)
   {
       RadMenuItem[] items = new RadMenuItem[] { new RadMenuItem("First"), new RadMenuItem("Second"), new RadMenuItem("Third") };
       RadMenu1.Items.AddRange(items);
   }
}

Visual Basic Copy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        Dim items() As RadMenuItem = {New RadMenuItem("First"), New RadMenuItem("Second"), New RadMenuItem("Third")}
        RadMenu1.Items.AddRange(items)
    End If
End Sub

Remarks

Use the AddRange method to add the items in the array of RadMenuItem objects specified by the items parameter. This allows you to add multiple RadMenuItem objects to the collection in a single step.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


Clear Method

Clear Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Clear Method

Removes all items from the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Clear()
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection

instance.Clear()
C#
public void Clear()

Remarks

Use the Clear method to remove all items from the collection. The Count property is set to 0.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


Contains Method

Contains Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Contains Method

item
A RadMenuItem to search for in the collection.
Determines whether the collection contains the specified item.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function Contains( _
   ByVal item As RadMenuItem _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim item As RadMenuItem
Dim value As Boolean

value = instance.Contains(item)
C#
public bool Contains(
   RadMenuItem item
)

Parameters

item
A RadMenuItem to search for in the collection.

Return Value

true if the collection contains the specified item; otherwise, false.

Remarks

Use the Contains method to determine whether the RadMenuItem specified by the item parameter is in the collection.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


FindItemByText Method

FindItemByText Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : FindItemByText Method

text
The value to search for.
Searches the RadMenuItemCollection for the first RadMenuItem with a Text property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByText( _
   ByVal text As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim text As String
Dim value As RadMenuItem

value = instance.FindItemByText(text)
C#
public RadMenuItem FindItemByText(
   string text
)

Parameters

text
The value to search for.

Return Value

A RadMenuItem whose Text property is equal to the specified value.

Remarks

The method returns the first item matching the search criteria. If no item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


FindItemByUrl Method

FindItemByUrl Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : FindItemByUrl Method

url
The value to search for.
Searches the RadMenuItemCollection for the first Item with a NavigateUrl property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByUrl( _
   ByVal url As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim url As String
Dim value As RadMenuItem

value = instance.FindItemByUrl(url)
C#
public RadMenuItem FindItemByUrl(
   string url
)

Parameters

url
The value to search for.

Return Value

A Item whose NavigateUrl property is equal to the specified value.

Remarks

The method returns the first Item matching the search criteria. If no Item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


FindItemByValue Method

FindItemByValue Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : FindItemByValue Method

value
The value to search for.
Searches the RadMenuItemCollection for the first RadMenuItem with a Value property equal to the specified value.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function FindItemByValue( _
   ByVal value As String _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim value As String
Dim value As RadMenuItem

value = instance.FindItemByValue(value)
C#
public RadMenuItem FindItemByValue(
   string value
)

Parameters

value
The value to search for.

Return Value

A RadMenuItem whose Value property is equal to the specified value.

Remarks

The method returns the first item matching the search criteria. If no item is matching then null (Nothing in VB.NET) is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


IndexOf Method

IndexOf Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : IndexOf Method

item
A RadMenuItem to search for in the collection.
Determines the index value that represents the position of the specified item in the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Function IndexOf( _
   ByVal item As RadMenuItem _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim item As RadMenuItem
Dim value As Integer

value = instance.IndexOf(item)
C#
public int IndexOf(
   RadMenuItem item
)

Parameters

item
A RadMenuItem to search for in the collection.

Return Value

The zero-based index position of the specified RadMenuItem in the collection.

Remarks

Use the IndexOf method to determine the index value of the RadMenuItem specified by the item parameter in the collection. If an item with this criteria is not found in the collection, -1 is returned.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


Insert Method

Insert Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Insert Method

index
The location in the collection to insert the RadMenuItem.
item
The RadMenuItem to add to the collection.
Inserts the specified RadMenuItem in the collection at the specified index location.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal item As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim index As Integer
Dim item As RadMenuItem

instance.Insert(index, item)
C#
public void Insert(
   int index,
   RadMenuItem item
)

Parameters

index
The location in the collection to insert the RadMenuItem.
item
The RadMenuItem to add to the collection.

Remarks

Use the Insert method to add a RadMenuItem to the collection at the index specified by the index parameter.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


Remove Method

Remove Method
See Also Example
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Remove Method

item
Removes the specified item from the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub Remove( _
   ByVal item As RadMenuItem _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim item As RadMenuItem

instance.Remove(item)
C#
public void Remove(
   RadMenuItem item
)

Parameters

item

Example

The following example demonstrates how to programmatically remove a RadMenuItem from a RadMenu control.
C# Copy Code
RadMenuItem newsItem = RadMenu1.FindItemByText("News");
if (newsItem != null)
{
   RadMenu1.Items.Remove(newsItem);
}

Visual Basic Copy Code
Dim newsItem As RadMenuItem = RadMenu1.FindItemByText("News")
If Not newsItem Is Nothing Then
    RadMenu1.Items.Remove(newsItem)
End If

Remarks

Use the Remove method to remove a RadMenuItem from the collection.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


RemoveAt Method

RemoveAt Method
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : RemoveAt Method

index
The index of the RadMenuItem to remove.
Removes the RadMenuItem at the specified index from the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Sub RemoveAt( _
   ByVal index As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim index As Integer

instance.RemoveAt(index)
C#
public void RemoveAt(
   int index
)

Parameters

index
The index of the RadMenuItem to remove.

Remarks

Use the RemoveAt method to remove the RadMenuItem at the specified index from the collection.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemCollection Class Properties

RadMenuItemCollection Class Properties
[image]
Telerik.WebControls Namespace : RadMenuItemCollection Class

For a list of all members of this type, see RadMenuItemCollection members.

Public Properties

 | Name | Description
Public Property | Capacity | (Inherited from System.Collections.CollectionBase)
Public Property | Count | (Inherited from System.Collections.CollectionBase)
Public Property | Item | Gets a RadMenuItem at the specified index in the collection.
Top

See Also

Reference

RadMenuItemCollection Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Item Property

Item Property
[image]
Telerik.WebControls Namespace > RadMenuItemCollection Class : Item Property

index
The zero-based index of the RadMenuItem to retrieve from the collection.

Gets a RadMenuItem at the specified index in the collection.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Default Property Item( _
   ByVal index As Integer _
) As RadMenuItem
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemCollection
Dim index As Integer
Dim value As RadMenuItem

instance.Item(index) = value

value = instance.Item(index)
C#
public RadMenuItem this[
   int index
]; {get; set;}

Parameters

index
The zero-based index of the RadMenuItem to retrieve from the collection.

Remarks

Use this indexer to get a RadMenuItem from the collection at the specified index, using array notation.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemCollection Class
RadMenuItemCollection Members

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemGroupSettings Class

RadMenuItemGroupSettings Class
See Also Members
[image]
Telerik.WebControls Namespace : RadMenuItemGroupSettings Class

Represents settings controlling child item behavior.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Class RadMenuItemGroupSettings
   Inherits MenuObjectWithState
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
C#
public class RadMenuItemGroupSettings : MenuObjectWithState

Inheritance Hierarchy

System.Object
Telerik.WebControls.MenuObjectWithState
Telerik.WebControls.RadMenuItemGroupSettings

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

RadMenuItemGroupSettings Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemGroupSettings Class Members

RadMenuItemGroupSettings Class Members
See Also Properties Methods
[image]
Telerik.WebControls Namespace : RadMenuItemGroupSettings Class

The following tables list the members exposed by RadMenuItemGroupSettings.

Public Properties

 | Name | Description
Public Property | ExpandDirection | Gets or sets the direction in which child items will open.
Public Property | Flow | Gets or sets the flow of child items.
Public Property | Height | Gets or sets a value indicating the height of child menu items (the whole item group).
Public Property | OffsetX | Gets or sets a value indicating the horizontal offset of child menu items considering their parent.
Public Property | OffsetY | Gets or sets a value indicating the vertical offset of child menu items considering their parent.
Public Property | Width | Gets or sets a value indicating the width of child menu items (the whole item group).
Top

Public Methods

 | Name | Description
Public Method | ToString | (Inherited from MenuObjectWithState)
Top

See Also

Reference

RadMenuItemGroupSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemGroupSettings Class Properties

RadMenuItemGroupSettings Class Properties
[image]
Telerik.WebControls Namespace : RadMenuItemGroupSettings Class

For a list of all members of this type, see RadMenuItemGroupSettings members.

Public Properties

 | Name | Description
Public Property | ExpandDirection | Gets or sets the direction in which child items will open.
Public Property | Flow | Gets or sets the flow of child items.
Public Property | Height | Gets or sets a value indicating the height of child menu items (the whole item group).
Public Property | OffsetX | Gets or sets a value indicating the horizontal offset of child menu items considering their parent.
Public Property | OffsetY | Gets or sets a value indicating the vertical offset of child menu items considering their parent.
Public Property | Width | Gets or sets a value indicating the width of child menu items (the whole item group).
Top

See Also

Reference

RadMenuItemGroupSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ExpandDirection Property

ExpandDirection Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : ExpandDirection Property

Gets or sets the direction in which child items will open.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property ExpandDirection As ExpandDirection
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As ExpandDirection

instance.ExpandDirection = value

value = instance.ExpandDirection
C#
public ExpandDirection ExpandDirection {get; set;}

Return Value

One of the ExpandDirection enumeration values. The default value is Auto.

Remarks

Use the ExpandDirection property to specify different expand direction than the automatically determined one. See the ExpandDirection description for more information.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


Flow Property

Flow Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : Flow Property

Gets or sets the flow of child items.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Flow As ItemFlow
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As ItemFlow

instance.Flow = value

value = instance.Flow
C#
public ItemFlow Flow {get; set;}

Return Value

One of the ItemFlow enumeration values. The default value is Vertical.

Remarks

Use the Flow property to customize the flow of child menu items. By default RadMenu mimics the behavior of Windows and child items (apart from top level ones) flow vertically.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


Height Property

Height Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : Height Property

Gets or sets a value indicating the height of child menu items (the whole item group).

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Height As Unit
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As Unit

instance.Height = value

value = instance.Height
C#
public Unit Height {get; set;}

Return Value

A Unit that represents the height of the child item group. The default value is Unit.Empty.

Remarks

If the total height of menu items exceeds the Height property scrolling will be applied.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


OffsetX Property

OffsetX Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : OffsetX Property

Gets or sets a value indicating the horizontal offset of child menu items considering their parent.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OffsetX As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As Integer

instance.OffsetX = value

value = instance.OffsetX
C#
public int OffsetX {get; set;}

Return Value

An integer specifying the horizontal offset of child menu items (measured in pixels). The default value is 0 (no offset).

Remarks

Use the OffsetX property to change the position where child items will appear.

To customize the vertical offset use the OffsetY property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


OffsetY Property

OffsetY Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : OffsetY Property

Gets or sets a value indicating the vertical offset of child menu items considering their parent.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property OffsetY As Integer
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As Integer

instance.OffsetY = value

value = instance.OffsetY
C#
public int OffsetY {get; set;}

Return Value

An integer specifying the vertical offset of child menu items (measured in pixels). The default value is 0 (no offset).

Remarks

Use the OffsetY property to change the position where child items will appear.

To customize the horizontal offset use the OffsetX property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


Width Property

Width Property
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : Width Property

Gets or sets a value indicating the width of child menu items (the whole item group).

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property Width As Unit
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As Unit

instance.Width = value

value = instance.Width
C#
public Unit Width {get; set;}

Return Value

A Unit that represents the width of the child item group. The default value is Unit.Empty.

Remarks

If the total width of menu items exceeds the Width property scrolling will be applied.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


IDataBinder Interface

IDataBinder Interface
See Also Members
[image]
Telerik.WebControls Namespace : IDataBinder Interface

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Private Interface IDataBinder
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
C#
private interface IDataBinder

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

IDataBinder Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


IDataBinder Interface Members

IDataBinder Interface Members
See Also Methods
[image]
Telerik.WebControls Namespace : IDataBinder Interface

The following tables list the members exposed by IDataBinder.

Public Methods

 | Name | Description
Method | BindToIEnumerable |
Method | BindToIHierarchicalEnumerable |
Method | BindToIListSource |
Method | ConvertDataViewToDataTable |
Method | ConvertToIEnumerable |
Top

See Also

Reference

IDataBinder Interface
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


IDataBinder Interface Methods

IDataBinder Interface Methods
[image]
Telerik.WebControls Namespace : IDataBinder Interface

For a list of all members of this type, see IDataBinder members.

Public Methods

 | Name | Description
Method | BindToIEnumerable |
Method | BindToIHierarchicalEnumerable |
Method | BindToIListSource |
Method | ConvertDataViewToDataTable |
Method | ConvertToIEnumerable |
Top

See Also

Reference

IDataBinder Interface
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


BindToIEnumerable Method

BindToIEnumerable Method
[image]
Telerik.WebControls Namespace > IDataBinder Interface : BindToIEnumerable Method

dataSource

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable Sub BindToIEnumerable( _
   ByVal dataSource As IEnumerable _
)
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
Dim dataSource As IEnumerable

instance.BindToIEnumerable(dataSource)
C#
virtual void BindToIEnumerable(
   IEnumerable dataSource
)

Parameters

dataSource

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IDataBinder Interface
IDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


BindToIHierarchicalEnumerable Method

BindToIHierarchicalEnumerable Method
[image]
Telerik.WebControls Namespace > IDataBinder Interface : BindToIHierarchicalEnumerable Method

tabs
enumerable
depth

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable Sub BindToIHierarchicalEnumerable( _
   ByVal tabs As RadMenuItemCollection, _
   ByVal enumerable As IHierarchicalEnumerable, _
   ByVal depth As Integer _
)
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
Dim tabs As RadMenuItemCollection
Dim enumerable As IHierarchicalEnumerable
Dim depth As Integer

instance.BindToIHierarchicalEnumerable(tabs, enumerable, depth)
C#
virtual void BindToIHierarchicalEnumerable(
   RadMenuItemCollection tabs,
   IHierarchicalEnumerable enumerable,
   int depth
)

Parameters

tabs
enumerable
depth

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IDataBinder Interface
IDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


BindToIListSource Method

BindToIListSource Method
[image]
Telerik.WebControls Namespace > IDataBinder Interface : BindToIListSource Method

listSource

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable Sub BindToIListSource( _
   ByVal listSource As IListSource _
)
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
Dim listSource As IListSource

instance.BindToIListSource(listSource)
C#
virtual void BindToIListSource(
   IListSource listSource
)

Parameters

listSource

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IDataBinder Interface
IDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


ConvertDataViewToDataTable Method

ConvertDataViewToDataTable Method
[image]
Telerik.WebControls Namespace > IDataBinder Interface : ConvertDataViewToDataTable Method

dataView

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable Function ConvertDataViewToDataTable( _
   ByVal dataView As DataView _
) As DataTable
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
Dim dataView As DataView
Dim value As DataTable

value = instance.ConvertDataViewToDataTable(dataView)
C#
virtual DataTable ConvertDataViewToDataTable(
   DataView dataView
)

Parameters

dataView

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IDataBinder Interface
IDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


ConvertToIEnumerable Method

ConvertToIEnumerable Method
[image]
Telerik.WebControls Namespace > IDataBinder Interface : ConvertToIEnumerable Method

dataSource
dataMember

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable Function ConvertToIEnumerable( _
   ByVal dataSource As Object, _
   ByVal dataMember As String _
) As IEnumerable
Visual Basic (Usage) Copy Code
Dim instance As IDataBinder
Dim dataSource As Object
Dim dataMember As String
Dim value As IEnumerable

value = instance.ConvertToIEnumerable(dataSource, dataMember)
C#
virtual IEnumerable ConvertToIEnumerable(
   object dataSource,
   string dataMember
)

Parameters

dataSource
dataMember

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IDataBinder Interface
IDataBinder Members

© 2002-2006, telerik. All Rights Reserved.


IRadMenuItemContainer Interface

IRadMenuItemContainer Interface
See Also Members
[image]
Telerik.WebControls Namespace : IRadMenuItemContainer Interface

Defines properties that menu item containers (RadMenu, RadMenuItem) should implement
Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Interface IRadMenuItemContainer
Visual Basic (Usage) Copy Code
Dim instance As IRadMenuItemContainer
C#
public interface IRadMenuItemContainer

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

IRadMenuItemContainer Members
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


IRadMenuItemContainer Interface Members

IRadMenuItemContainer Interface Members
See Also Properties
[image]
Telerik.WebControls Namespace : IRadMenuItemContainer Interface

The following tables list the members exposed by IRadMenuItemContainer.

Public Properties

 | Name | Description
Property | Items | Gets the collection of child items.
Property | Owner | Gets the parent IMenuItemContainer.
Top

See Also

Reference

IRadMenuItemContainer Interface
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


IRadMenuItemContainer Interface Properties

IRadMenuItemContainer Interface Properties
[image]
Telerik.WebControls Namespace : IRadMenuItemContainer Interface

For a list of all members of this type, see IRadMenuItemContainer members.

Public Properties

 | Name | Description
Property | Items | Gets the collection of child items.
Property | Owner | Gets the parent IMenuItemContainer.
Top

See Also

Reference

IRadMenuItemContainer Interface
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


Items Property

Items Property
[image]
Telerik.WebControls Namespace > IRadMenuItemContainer Interface : Items Property

Gets the collection of child items.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable ReadOnly Property Items As RadMenuItemCollection
Visual Basic (Usage) Copy Code
Dim instance As IRadMenuItemContainer
Dim value As RadMenuItemCollection

value = instance.Items
C#
virtual RadMenuItemCollection Items {get;}

Return Value

A RadMenuItemCollection that represents the child items.

Remarks

Use this property to retrieve the child items. You can also use it to programmatically add or remove items.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IRadMenuItemContainer Interface
IRadMenuItemContainer Members

© 2002-2006, telerik. All Rights Reserved.


Owner Property

Owner Property
[image]
Telerik.WebControls Namespace > IRadMenuItemContainer Interface : Owner Property

Gets the parent IMenuItemContainer.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Overridable ReadOnly Property Owner As IRadMenuItemContainer
Visual Basic (Usage) Copy Code
Dim instance As IRadMenuItemContainer
Dim value As IRadMenuItemContainer

value = instance.Owner
C#
virtual IRadMenuItemContainer Owner {get;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

IRadMenuItemContainer Interface
IRadMenuItemContainer Members

© 2002-2006, telerik. All Rights Reserved.


Get more help

Telerik RadMenu v4.4 Send comments on this topic.
Get more help

Glossary Item Box

In case you cannot find the needed information in this manual, you can also review the following resources:

  • online Knowledge Base - visit http://www.telerik.com/KB/ and browse or search the articles for a solution to your problem;
  • Telerik product forums at http://www.telerik.com/Forums/ - consult with other people who use our products;
    Use the in-built search on the page.
  • live examples at http://www.telerik.com/r.a.d.controls/ - use the left pane to navigate to the control and functionality you need. In the right pane, toggle among the various pages (Description, C#, ASPX, etc.) to learn about the functionality displayed.
  • online code library - visit http://www.telerik.com/community/code-library/default.aspx adn download a growing number of samples, get hands-on experience with the RadControls and submit some of your favorite implementations.
  • contact Telerik support with a technical question using your Client.NET account at http://www.telerik.com/Default.aspx?PageId=2069.

You can also send us comments on any topic by clicking on the link in the top right corner of the page:

The Send comments link

Alternatively, you can send an email to documentation@telerik.com with feedback or inquiries concerning our manuals.

© 2002-2008 Telerik. All Rights Reserved.


Change the menu images

Telerik RadMenu v4.4 Send comments on this topic.
Change the menu images
See Also

Glossary Item Box

If you want the menu look to comply with your web site theme, you may need to change images used by the skin.

The simplest way is to modify one of the ready-made skins.

Example

The below example uses the Outlook skin as a starting point.

To change images in the Outlook skin:

  1. Create a copy of the RadControls/Skins/Outlook folder in the same parent folder, i.e. RadControls/Skins. Rename the copied Outlook folder to MyOutlook.
  2. Open the CSS file and replace Outlook with MyOutlook globally. The theme name corresponds to the CSS class of the menu.

The following CSS selectors define the images inside the skin:

  • .RadMenu_MyOutlook li a
    the background property defines the left enclosing image;

  • .RadMenu_MyOutlook li a .wrap
    the background property defines the right enclosing image;

  • .RadMenu_MyOutlook li a .innerWrap
    the background property defines the background image behind the item text.

If you change the images, you may also change the padding-left value of the li a selector and the padding-right value of the .wrap selector. These should (generally) be equal to the width of the images, otherwise the innerWrap span will spread over the containers fully, effectively hiding the enclosing images.

See Also

Understanding the HTML output of Telerik RadMenu
Skins

© 2002-2008 Telerik. All Rights Reserved.


Create custom skin

Telerik RadMenu v4.4 Send comments on this topic.
Create custom skin

Glossary Item Box

Name of the skin

First you need to name your skin. Keep in mind that menu skins are case sensitive and you should use the exact casing anywhere the skin name is required. Lets name the skin "MySkin".

Location of the skin

Menu skins are typically located in ~/RadControls/Menu/Skins. You can change that location through the SkinsPath property. However for simplicity we shall assume that the default location is used. We need to create a folder named after the skin in that location:

Skin file

Menu appearance is defined using a set of CSS rules. They need to be stored in a CSS file which Telerik RadMenu will automatically register. The CSS file should be located in the skin folder and be named "styles.css".

Test page

We would create a simple menu setup where we will test our skin. Create a new ASPX page build a simple menu structure using "Build RadMenu". Set the Skin property to "MySkin":

If you view that page in the browser the menu should appear "skinless":

Creating the skin root CSS rule

Each menu skin must have a "root" CSS rule which is applied at the root tag of the menu. That CSS rule must follow this naming convention: RadMenu_SkinName which in our case should be RadMenu_MySkin. Open the styles.css file and add the following CSS rule at the beginning:

Setting the font

The easiest way to set the font that your menu should use is in the "root" CSS rule:

© 2002-2008 Telerik. All Rights Reserved.


DataBinding expressions (DataBound mode)

Telerik RadMenu v4.4 Send comments on this topic.
DataBinding expressions (DataBound mode)

Glossary Item Box

Copy Code
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/menu1.mdb"SelectCommand="SELECT * FROM [Table1]" />
<rad:RadMenu ID="RadMenu1" runat="server" DataFieldID="ID" DataFieldParentID="ParentID"
DataSourceID="AccessDataSource1">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Text") %>' />
</ItemTemplate>
</rad:RadMenu>

© 2002-2008 Telerik. All Rights Reserved.


For a page

Telerik RadMenu v4.4 Send comments on this topic.
For a page

Glossary Item Box

© 2002-2008 Telerik. All Rights Reserved.


Glossary

Telerik RadMenu v4.4 Send comments on this topic.
Glossary

Glossary Item Box

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

M

Master Pages
Common locations known as Master Pages allow you to define structure and interface elements - such as a header, footer, or navigation bar - to be shared by many pages in your site.

© 2002-2008 Telerik. All Rights Reserved.


Guidelines for Specifying Domain Names

Telerik RadMenu v4.4 Send comments on this topic.
Guidelines for Specifying Domain Names

Glossary Item Box

To create a License key you will need to know the IP and domain/machine name by which you plan to access the control, i.e.

http://123.123.123.123/MyApplication/

http://www.mysite.com/MyApplication/

http://MachineName/MyApplication/

If you plan to sue the control on localhost or 127.0.0.1 you do not need keys - the control will work properly, but a copyright message will be displayed occasionally.

The control checks the URL by which it is accessed and compares this URL to the IP and domain name encoded in the license key. If these do not match, a copyright message will be shown.

Entering domain/machine names

Use only top-level domain names. The control will work on all other subdomains. Do not enter prefixes like www or http://

Original URL | Right | Wrong
http://www.mysite.com | mysite.com | www.mysite.com http://www.mysite.com
http://mysite.com | mysite.com | http://mysite.com
http://support.mysite.com | mysite.com | support.mysite.com
http://mydomain/ | mydomain | http://mydomain
http://machinename/ | machinename | http://machinenam

In case of a complex country-specific domain name (like www.mysite.co.uk, www.mysite.org.bg) you need to enter the actual domain name (mysite) followed by the full extension (co.uk):

Original URL | Right | Wrong
http://www.mysite.co.uk | mysite.co.uk | http://www.mysite.co.uk
http://mysite.gov.tw | mysite.gov.tw | http://mysite.gov.tw
http://www.support.mysite.biz.nl | mysite.biz.nl | http://www.support.mysite.biz.nl

If the the domain/machine name is unknown, or if the control will be used on localhost, use localhost in the domain field when creating the keys.

Entering IPs

Use only the top-level IP address. The control will work on all subdomains and ports. Do not enter prefixes like www or http://

Original URL | Right | Wrong
http://123.123.123.123/ | 123.123.123.123 | http://123.123.123.123
http://123.123.123.123:8080/ | 123.123.123.123 | 123.123.123.123:8080 http://123.123.123.123 http:// 123.123.123.123:8080

Do not enter an IP for the live server (not the development server) in case it has a domain name.

Original URL | Right | Wrong
http://www.mysite.com | mysite.com | http://123.123.123.123

If you have a dynamic DNS/IP, then it would be best to access the control by a domain name, rather than IP. In this case, use 127.0.0.1 in the IP field when creating the keys.

If the IP is unknown, or if the control is to be used on localhost only, use 127.0.0.1 in the IP field when creating the keys.

Other Important Information

If you are behind a firewall, the license ley will still work, as only the URL is checked.

The key will work for the major version of the product it was created for. For example, if the key is created for Telerik RadMenu v4.x it will NOT work on another major version (such as v3.x).

Back to Setting License Keys.

© 2002-2008 Telerik. All Rights Reserved.


More About License

Telerik RadMenu v4.4 Send comments on this topic.
More About License

Glossary Item Box

The LicenseFiles are XML files, which contain the licensing information (Company and LicenseKey) for every component of the Telerik RadControls for ASP.NET web-suite. This approach is much more convenient than setting licensing information directly in the control's properties, especially when you use multiple components on multiple pages. In case you upgrade your component, or implement the same application on a different server (domain) you have to change the Company and LicenseKey information only once – in the LicenseFile. Every Telerik component is shipped with a LicenseFile.XML located in the "~/RadControls" subfolder of the web-application. The LicenseFile property is set by default to point to this file so all you have to do is enter the required properties in the file. Below is a sample LicenseFile.XML:

<root>

<license control="editor" company="YOUR COMPANY" licenseKey="YOUR LICENSE KEY1"/>
<license control="spell" company="YOUR COMPANY" licenseKey="YOUR LICENSE KEY2"/>
<license control="menu" company="YOUR COMPANY" licenseKey="YOUR LICENSE KEY3"/>

</root>

Please, note that you may use a single LicenseFile to unlock more than one Telerik components.

If you place trial and commercial key(s), Standard or Professional edition, the editor will use the commercial key(s).

Note:The values set in the LicenseKey and Company properties of the Telerik RadEditor tag will override the ones set in the LicenseFile. If you want to use the LicenseFile approach make sure you remove the LicenseKey and Company properties from the Telerik RadEditor tag.

© 2002-2008 Telerik. All Rights Reserved.


Support Options

Telerik RadMenu v4.4 Send comments on this topic.
Support Options

Glossary Item Box

© 2002-2008 Telerik. All Rights Reserved.


Familiar with Telerik RadMenu?

Glossary Item Box

Familiar with Telerik RadMenu?

If you are upgrading from a previous version of Telerik RadMenu, check the following sections in this manual:

  • What's new
  • Changes and backward compatibility
  • Upgrading instructions
Please note that Telerik RadMenu v4.0 is not backward compatible with previous versions.

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemChecked

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemChecked
See Also

Glossary Item Box

If specified, the OnClientItemChecked client-side event handler is called after a menu item is checked. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemCheckedHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemChecked="OnClientItemCheckedHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemClose
OnClientItemUnChecking
OnClientItemUnChecked

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemUnChecked

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemUnChecked
See Also

Glossary Item Box

If specified, the OnClientItemUnChecked client-side event handler is called after a menu item is unchecked. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

This event cannot be cancelled.

Example

Copy Code
<script type="text/javascript">
function OnClientItemUnCheckedHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemUnChecked="OnClientItemUnCheckedHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemClose
OnClientItemChecked
OnClientItemUnChecking

© 2002-2008 Telerik. All Rights Reserved.


OnClientItemUnChecking

Telerik RadMenu v4.4 Send comments on this topic.
OnClientItemUnChecking
See Also

Glossary Item Box

If specified, the OnClientItemUnChecking client-side event handler is called before a menu item is unchecked. Two parameters are passed to the handler:

  • sender, the menu client object;
  • eventArgs with one property, Item (the instance of the menu item).

The OnClientItemUnChecking event can be cancelled. To do so, return False from the event handler.

Example

Copy Code
<script type="text/javascript">
function OnClientItemUnCheckingHandler(sender, eventArgs)
{
alert(eventArgs.Item.Text);
}
</script>
<rad:RadMenu ID="RadMenu1"
runat="server"
OnClientItemUnChecking="OnClientItemUnCheckingHandler">
....
</rad:RadMenu>

See Also

Client-side event handling
OnClientItemClose
OnClientItemChecked
OnClientItemUnChecked

© 2002-2008 Telerik. All Rights Reserved.


Assembly Overview

RadMenu Assembly

Namespaces

Namespace | Description
Telerik.WebControls |


Getting Started - RadMenu

Getting Started

© 2002-2006, telerik. All Rights Reserved.


Introduction - RadMenu

Introduction

© 2002-2006, telerik. All Rights Reserved.


AnimationSettings Class Methods

AnimationSettings Class Methods
[image]
Telerik.WebControls Namespace : AnimationSettings Class

For a list of all members of this type, see AnimationSettings members.

Public Methods

 | Name | Description
Public Method | ToString | (Inherited from MenuObjectWithState)
Top

See Also

Reference

AnimationSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ToString Method

ToString Method
[image]
Telerik.WebControls Namespace > AnimationSettings Class : ToString Method

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As AnimationSettings
Dim value As String

value = instance.ToString()
C#
public virtual string ToString()

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

AnimationSettings Class
AnimationSettings Members

© 2002-2006, telerik. All Rights Reserved.


AnimationType Enumeration

AnimationType Enumeration
[image]
Telerik.WebControls Namespace : AnimationType Enumeration

Represents the effects that can be used in an animation.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Enum AnimationType
   Inherits Enum
Visual Basic (Usage) Copy Code
Dim instance As AnimationType
C#
public enum AnimationType : Enum

Members

Member | Description
None |
Linear |
InQuad |
OutQuad |
InOutQuad |
InCubic |
OutCubic |
InOutCubic |
InQuart |
OutQuart |
InOutQuart |
InQuint |
OutQuint |
InOutQuint |
InSine |
OutSine |
InOutSine |
InExpo |
OutExpo |
InOutExpo |
InBack |
OutBack |
InOutBack |
InBounce |
OutBounce |
InOutBounce |
InElastic |
OutElastic |
InOutElastic |

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Telerik.WebControls.AnimationType

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ExpandDirection Enumeration

ExpandDirection Enumeration
[image]
Telerik.WebControls Namespace : ExpandDirection Enumeration

This enumeration determines the direction in which child items will open.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Enum ExpandDirection
   Inherits Enum
Visual Basic (Usage) Copy Code
Dim instance As ExpandDirection
C#
public enum ExpandDirection : Enum

Members

Member | Description
Auto | The direction is determined by parent's ItemFlow and level.
Up | Child items open above their parent.
Down | Child items open below their parent.
Left | Child items open from the left side of their parent.
Right | Child items open from the right side of their parent.

Remarks

When set to Auto the direction is determined by the following rules

  • If the item is top level and the parent item flow is Horizontal the direction will be Down.
  • If the item is top level and the parent item flow is Vertical the direction will be Right.
  • If the item is subitem (a child of another menu item rather than the RadMenu itself) the direction is Right.

Note:

If there is not enough room for the child items to open the expand direction is inverted. For example Right becomes Left, Down becomes Up and vice versa.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Telerik.WebControls.ExpandDirection

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ItemFlow Enumeration

ItemFlow Enumeration
[image]
Telerik.WebControls Namespace : ItemFlow Enumeration

Represents the different ways menu items can flow.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Enum ItemFlow
   Inherits Enum
Visual Basic (Usage) Copy Code
Dim instance As ItemFlow
C#
public enum ItemFlow : Enum

Members

Member | Description
Vertical | Items will flow one below the other
Horizontal | Items will flow one after another

Remarks

The ItemFlow enumeration is used to specify the flow of submenu items.

Inheritance Hierarchy

System.Object
System.ValueType
System.Enum
Telerik.WebControls.ItemFlow

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuEventHandler Delegate

RadMenuEventHandler Delegate
[image]
Telerik.WebControls Namespace : RadMenuEventHandler Delegate

sender
e

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Delegate Sub RadMenuEventHandler( _
   ByVal sender As Object, _
   ByVal e As RadMenuEventArgs _
)
Visual Basic (Usage) Copy Code
Dim instance As New RadMenuEventHandler(AddressOf HandlerMethod)
C#
public delegate void RadMenuEventHandler(
   object sender,
   RadMenuEventArgs e
)

Parameters

sender
e

Requirements

Namespace: Telerik.WebControls

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: RadMenu (in RadMenu.dll)

See Also

Reference

Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItem Class Events

RadMenuItem Class Events
[image]
Telerik.WebControls Namespace : RadMenuItem Class

For a list of all members of this type, see RadMenuItem members.

Public Events

 | Name | Description
Public Event | DataBinding | (Inherited from System.Web.UI.Control)
Public Event | Disposed | (Inherited from System.Web.UI.Control)
Public Event | Init | (Inherited from System.Web.UI.Control)
Public Event | Load | (Inherited from System.Web.UI.Control)
Public Event | PreRender | (Inherited from System.Web.UI.Control)
Public Event | Unload | (Inherited from System.Web.UI.Control)
Top

See Also

Reference

RadMenuItem Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


RadMenuItemGroupSettings Class Methods

RadMenuItemGroupSettings Class Methods
[image]
Telerik.WebControls Namespace : RadMenuItemGroupSettings Class

For a list of all members of this type, see RadMenuItemGroupSettings members.

Public Methods

 | Name | Description
Public Method | ToString | (Inherited from MenuObjectWithState)
Top

See Also

Reference

RadMenuItemGroupSettings Class
Telerik.WebControls Namespace

© 2002-2006, telerik. All Rights Reserved.


ToString Method

ToString Method
[image]
Telerik.WebControls Namespace > RadMenuItemGroupSettings Class : ToString Method

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Overridable Function ToString() As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenuItemGroupSettings
Dim value As String

value = instance.ToString()
C#
public virtual string ToString()

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenuItemGroupSettings Class
RadMenuItemGroupSettings Members

© 2002-2006, telerik. All Rights Reserved.


RadControlsDir Property

RadControlsDir Property
[image]
Telerik.WebControls Namespace > RadMenu Class : RadControlsDir Property

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property RadControlsDir As String
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As String

instance.RadControlsDir = value

value = instance.RadControlsDir
C#
public string RadControlsDir {get; set;}

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


UseEmbeddedScripts Property

UseEmbeddedScripts Property
[image]
Telerik.WebControls Namespace > RadMenu Class : UseEmbeddedScripts Property

Gets or sets a value indicating whether to use the embedded JavaScript files or not.

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration)
Public Property UseEmbeddedScripts As Boolean
Visual Basic (Usage) Copy Code
Dim instance As RadMenu
Dim value As Boolean

instance.UseEmbeddedScripts = value

value = instance.UseEmbeddedScripts
C#
public bool UseEmbeddedScripts {get; set;}

Return Value

True if embedded JavaScript files are to be used; otherwise false. The default value is true.

Remarks

Use this property for debugging purposes or to apply any modifications to the JavaScript files.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Reference

RadMenu Class
RadMenu Members

© 2002-2006, telerik. All Rights Reserved.


Telerik.WebControls Namespace

Telerik.WebControls Namespace
See Also Inheritance Hierarchy

Classes

Class | Description
AnimationSettings | Represents the animation settings used for expand or collapse effects.
MenuDataBinder |
MenuStateBag |
RadMenu | A navigation control used to create collapsing interfaces.
RadMenuEventArgs |
RadMenuItem | Represents a single item in the RadMenu class.
RadMenuItemBinding |
RadMenuItemBindingCollection |
RadMenuItemCollection | A collection of RadMenuItem objects in a RadMenu control.
RadMenuItemGroupSettings | Represents settings controlling child item behavior.

Interfaces

Interface | Description
IDataBinder |
IRadMenuItemContainer | Defines properties that menu item containers (RadMenu, RadMenuItem) should implement

Delegates

Delegate | Description
RadMenuEventHandler |

Enumerations

Enumeration | Description
AnimationType | Represents the effects that can be used in an animation.
ExpandDirection | This enumeration determines the direction in which child items will open.
ItemFlow | Represents the different ways menu items can flow.

See Also

Reference

RadMenu Assembly

© 2002-2006, telerik. All Rights Reserved.


Telerik.WebControls Namespace Inheritance Hierarchy

Telerik.WebControls Namespace Inheritance Hierarchy

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Telerik.WebControls.RadMenuItemCollection
System.EventArgs
Telerik.WebControls.RadMenuEventArgs
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.BaseDataBoundControl
System.Web.UI.WebControls.DataBoundControl
Telerik.RadMenuUtils.RadControl
Telerik.RadMenuUtils.RadSkinnableControl
Telerik.WebControls.RadMenu
Telerik.WebControls.RadMenuItem
System.Web.UI.StateManagedCollection
Telerik.WebControls.RadMenuItemBindingCollection
Telerik.WebControls.MenuDataBinder
Telerik.WebControls.MenuObjectWithState
Telerik.WebControls.AnimationSettings
Telerik.WebControls.RadMenuItemGroupSettings
Telerik.WebControls.MenuStateBag
Telerik.WebControls.RadMenuItemBinding

See Also

Reference

RadMenu Assembly

© 2002-2006, telerik. All Rights Reserved.