| | |
| | | //è¡¨æ ¼çæ°æ®å¡«å
|
| | | for (var i = 0; i < colNames.length; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | cols.push({ "ColumnName": colNames[i], "IsHide": dataCols[1] == 1 ? true : false, "Alignment": dataCols[2] }) |
| | | cols.push({ "ColumnName": colNames[i], "IsHide": dataCols[1] == 1 ? true : false, "Alignment": dataCols[2], "ColumnWidth": dataCols[3] }) |
| | | } |
| | | option.data = cols; |
| | | table.render(option); |
| | |
| | | } else { |
| | | //é»è®¤ä¸éä¸ æ¾ç¤ºåä½å±
å·¦ è¡¨æ ¼çæ°æ®å¡«å
|
| | | for (var i = 0; i < colNames.length; i++) { |
| | | cols.push({ "ColumnName": colNames[i], "IsHide": false, "Alignment": "L" }) |
| | | cols.push({ "ColumnName": colNames[i], "IsHide": false, "Alignment": "L", "ColumnWidth": 120 }) |
| | | } |
| | | option.data = cols; |
| | | table.render(option); |
| | |
| | | { field: 'ColumnName', title: 'åå', width: 100 } |
| | | , { file: 'IsHide', title: 'æ¯å¦éè', width: 100, templet: '#IsHide' } |
| | | , { field: 'Alignment', title: '坹齿¹å¼', width: 100, templet: '#Alignment' } |
| | | , { field: 'ColumnWidth', title: 'å宽', width: 100, templet: '#ColumnWidth', edit: 'text' } |
| | | ]] |
| | | }; |
| | | } |
| | |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | if (data1.data[0].HColumnWidth != 0) { |
| | | option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["width"] = ""; |
| | | } |
| | | //if (data1.data[0].HColumnWidth != 0) { |
| | | // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; |
| | | //} else { |
| | | // option.cols[0][i + 1]["width"] = ""; |
| | | //} |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |