ASP. NET Aries getting started development tutorial 5: toolbar area of the custom list page, asp. netaries
Preface:
Hurry up and continue to write the tutorial, because the content that the user expects is processed by the business.
I have to continue to work hard.
This section describes how to use the toolbar.
Default toolbar introduction:
The Toolbar contains five buttons by default, which are displayed based on different permissions:
Add: add Delete: del export, export import, and (import template download, referred to as) export template: import
In the standard 4 request of the page, you can see an actionKeys value, which is used to determine the presentation of permissions:
You can get this value through AR. Global. Variable. actionKeys.
The following describes common operations:
1: Hide the toolbar
var dg = new AR.DataGrid("Article", "Article", "grid"); dg.ToolBar.isHidden = true; dg.bind();
2: Custom Toolbar
Var dg = new AR. DataGrid ("Article", "Article", "grid ");Dg. ToolBar. $ target = $ ("# Node ID ");Dg. bind ();
3: Hide or change the button (although you already have the permission)
Hide: Set the object's isHidden to false.
Operation: $ target of the object is a JQ object. You can operate on the JQ object, for example:
dg.ToolBar.btnAdd.$target.hide();
4: Add Custom button
Lv2action is a level-2 permission. It determines whether to display the permission based on actionKeys.
Effect:
5. Get the Custom button object
Objects can be obtained only after the toolbar is created.
Effect:
Other 1:
The new button has two attributes: winTitle and winUrl.
You can customize text and click to jump to the URL.
Other buttons do not offer this offer.
Other 2:
Each button has two interception events, which can be used to intercept and process the events:
OnBeforeExecute
OnAfterExecute
Summary:
Compared with the query box, the toolbar has fewer and simpler tasks.
Next, we will introduce the data presentation tutorial of the DataGrid.