APNSoft.com - Web Controls, components for ASP.NET
 About Us 
 Articles 
 Products
 Downloads 
 Purchase
 Support

DataGrid
Controls Suite 4.5


Overview
Features
Reference Book
Live Demos
Populating with Data
Columns
Rows
Appearance & Layout
Behavior
Running Mode
Context Menu
Custom AJAX call
Auto-resizing
Bottom Bar
Application scenarios







APNSoft DataGrid provides you with full support for cross-browser context menu. You can use context menu for rows or column headers. Please right-click anywhere on the Grid to activate the context menu (the command Control key + Left mouse button is used for Opera).

You use the ContextMenuHeader.Template property to specify the template for column headers or ContextMenuRow.Template property to specify the template for rows. The property value is a raw XML string or path to the XML template file for context menu.

You can use multiple context menus and switch between them on the client side. This example displays alternate context menu for the 'BERGS' row. To use additional context menus do the following:
  • Add context menu on the server side by using the method AddContextMenu().
  • Set the property ClientSideOnContextMenuRow (or ClientSideOnContextMenuHeader for headers). This property specifies the name of the client-side function to be called before the context menu is displayed.
  • Create a client-side procedure as specified by the ClientSideOnContextMenuRow property. In this procedure you replace the default context menu with the additional one.




Code Samples:


© 2003-2024 APNSoft. All rights reserved.    Terms of use.