EasyUI datagrid border processing, adding borders and removing borders can all be done, easyuidatagrid

Source: Internet
Author: User

EasyUI datagrid border processing, adding borders and removing borders can all be done, easyuidatagrid

The following is the demo for processing the datagrid border on the EasyUI Official Website:

The main sentence is:

$('#dg').datagrid('getPanel').removeClass('lines-both lines-no lines-right lines-bottom').addClass(cls);

    <!DOCTYPE html>    

Of course, you can also use the following method (styler part) when defining the datagrid ):

Grid = $ ('# grid '). datagrid ({title: '', url:'', striped: true, rownumbers: true, pagination: false, singleSelect: true, idField: 'id', sortOrder: 'desc', columns: [{width: '000000', title: 'address', field: 'address', sortable: true, styler: function (value, row, index) {return 'border: 0; ';}}]});




Easyui datagrid toolbar search box

Your problem is that in the datagrid toolbar, you only paste the toolbar code here. The datagrid toolbar can be spliced to the div. Didn't you splice it ??

Easyui datagrid row operation handling

I have a idea. For details, refer:
1. Add the same class to all "correct" or "error" buttons. // Mark with class
2. After you click "correct" or "wrong" for a row, change the class of both buttons in the row,
In this case, the tag is modified. In the second case, the style is modified to let people know what the processing result is.
// For example, if the selected item is highlighted, the corresponding item is dimmed.

3. Use $ ('. clazz'). size () to obtain the number of clazz values. If it is 0, all values are modified. Otherwise, special processing is performed on the class row.

In addition:
You can consider placing the class mark on the whole line, which makes the operation in step 3 easier.

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.