Basic use of devexpress Asp.net (5) aspxcloudcontrol

Source: Internet
Author: User
The main feature of the aspxcloudcontrol control is its appearance, which is mainly used for navigation connection, label, and other functions. You can use data binding and custom items to display data.

In fact, the use of aspxcloudpanel is very simple, and data can be displayed through data binding, custom, and other methods.
Custom display: Code
Cloudcontrolitem Item1 =   New Cloudcontrolitem ( " Home " , 5 , " ../Default. aspx " , " Default " );
Cloudcontrolitem item2
=   New Cloudcontrolitem ( " Products " , 10 , " /Products " );
Cloudcontrolitem item3
=   New Cloudcontrolitem ( " Contacts " , 20 , " /Contacts " );
Cloudcontrolitem item5
=   New Cloudcontrolitem ( " News " , 30 , " /News " );
Cloudcontrolitem item4
=   New Cloudcontrolitem ( " About " , 40 );
Aspxcloudcontrol1.items. Add (Item1 );
Aspxcloudcontrol1.items. Add (item2 );
Aspxcloudcontrol1.items. Add (item3 );
Aspxcloudcontrol1.items. Add (item4 );
Aspxcloudcontrol1.items. Add (item5 );

aspxcloudcontrol1.itembegintext = " { " ;
aspxcloudcontrol1.itemendtext
= " } " ;
aspxcloudcontrol1.itembeginendtextcolor
= system. drawing. color. brown;

Aspxcloudcontrol1.maxcolor=System. Drawing. color. Red;
Aspxcloudcontrol1.mincolor
=System. Drawing. color. Green;
Aspxcloudcontrol1.linkstyle. hovercolor
=System. Drawing. color. Pink;

Data Binding: Code
< Dxcc: aspxcloudcontrol ID = "Aspxcloudcontrol2" Runat = "Server" Onitemdatabound = "Aspxcloudcontrol2_itemdatabound"
Performanceid
= "Accessperformance1"
Namefield
= "Capital"
Navigateurlfield
= "Capital"
Navigateurlformatstring
= "Default. aspx? Id = {0 }"
Textfield
= "Capital" >
< Rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
< Dxcc: rankproperties > </ Dxcc: rankproperties >
</ Rankproperties >
</ Dxcc: aspxcloudcontrol >

We can also randomly set the size of each item through the itemdatabound event. Code
Random random =   New Random ( 10 );
Protected   Void Aspxcloudcontrol2_itemdatabound ( Object Source, cloudcontrolitemeventargs E)
{
E. Item. Value
= Random. nextdouble () *   10 ; // SET SIZE
}

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.