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