Use the netadvantage control: ultragrid

Source: Internet
Author: User
1. Add Column
Start \ basic Settings \ data schema \ manually define a schema \ add column and name the field in the database.

2. Add column Chinese name
Band and column Settings \ band [0] (after manually adding column) \ columns \ Select column \ header \ modify the caption attribute

3. The attributes of the entire table are modified in basic settings or functional buttons; the attributes of a single column are modified in band.

4. In basic settings, data schema is used to set data columns; presets is used to adjust styles; picker is used to define some option attributes.

5. Bind data
This. ultrated1.datasource = mydataset. Tables [0];
The data column can also be set in datatable, column [0]. columnname or column [0]. Caption

6. Header line feed
Set smart button/wrap header text to true. The default value is non-line feed.

7. Sorting: picker/filtring/allow
8. GROUP: picker/Outlook groupby/active
9. Edit: picker/update
10. Multi-row header: column arrangement designer/Add group/Add level/drag the corresponding column to the group,
11. Hidden Column: column arrangement designer/show hide
12. A Single Column cannot be edited: band [0]/column/allowedit
13. Click cell selection status: band [0]/column/cellclickaction
14. Bound control: band [0]/column/editorcontrol
15. Merge cells: band [0]/column/mergedcell...
16. Fixed non-scroll column: picker/Fixed Header
17. Add row:
This. ultrated1.rows. Band. addnew ();
This. ultrated1.rows [This. ultrated1.rows. Count-1]. cells ["rec_id"]. value = commomfun. GETID ();
18. Delete row:
If (this. ultrated1.rows. Count <= 0)
{
Messageinfo. showmessage ("m_system_client_0009 ");
Return;
}
# Endregion
If (this. ultrated1.activerow! = NULL)
{
This. ultrated1.activerow. Selected = true;
}
If (messageinfo. showmessage ("m_system_client_0003", messageboxbuttons. yesno) = dialogresult. Yes)
{
Bool blndeleted = false;
For (INT I = 0; I <this. ultrated1.rows. Count; I ++)
{
If (this. ultrated1.rows [I]. Selected | this. ultrated1.rows [I]. isactiverow)
{
If (this. ultrated1.rows [I]. Delete (false ))
{
I --;
}
Blndeleted = true;
}
}

If (! Blndeleted)
{
Messageinfo. showmessage ("m_system_client_0009 ");
}
}

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.