Easyui The DataGrid removes the horizontal line between the outer border and the row

Source: Internet
Author: User

This is something written in a previously written project, in order to make the DataGrid style look good, all done this processing:

Today, my colleague asked again to record

$ (' #id '). DataGrid ({width: ' 99% ', height:150, Fit:false, now                        Rap:true, url: ' URL address ', singleselect:true, columns: [[  {field: ' TaskName ', title: ' title ', Width: ' 100% ', formatter:function (V, Rd, I) {if (v! = undefined) {return ' </img> <a href=" # "onclick= reportdetails (\ ' + Rd. Mattypeint + ' \ ', \ ' + Rd. Periodno + ' \ ', \ ' + Rd. TaskId + ' \ ', \ ' + v + ' \ ', \ ' + Rd. Mattype + ' \ ') class= "Href-noneline-blacknofont" > ' + V + ', ' + ' <span class= ' red-font ' > ' + Rd. Mattype + ' </span> total ' + ' <span class= ' red-font ' > ' + Rd.                                Pricecount + ' </span> bar ';              }              }                        }                    ]                ] ,Onloadsuccess:function (data) {var panel = $ (this). DataGrid (' Getpanel ');                    var tr = panel.find (' div.datagrid-body tr ');                        Tr.each (function () {var TD = $ (this). Children (' TD ');                        Td.css ({"border-width": "0"});                    ;                }); }            });

  

The key is:

Onloadsuccess:function (data) {var panel = $ (this). DataGrid (' Getpanel ');  var tr = panel.find (' div.datagrid-body tr ');    Tr.each (function () {var TD = $ (this). Children (' TD '); Td.css ({"border-width": "0"});

Here is the go outside border line:

#idDiv. Datagrid-header {
Position:absolute;
Visibility:hidden;
}

#idDiv. datagrid-body {
Overflow:hidden;
}

Easyui The DataGrid removes the horizontal line between the outer border and the row

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.