ASP. NET Aries getting started development tutorial 5: toolbar area of the custom list page, asp. netaries

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.