null的粘贴
null的粘贴您好,这个问题我这里没能重现,参考:
import 'bootstrap.css';
import '@grapecity/wijmo.styles/wijmo.css';
import './styles.css';
import { FlexGrid } from '@grapecity/wijmo.grid';
document.readyState === 'complete' ? init() : window.onload = init;
function init() {
// generate some random data
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','), data = [];
for (var i = 0; i < countries.length-1; i++) {
data.push({
id: i,
country: countries,
downloads: Math.round(Math.random() * 20000),
sales: Math.random() * 10000,
expenses: Math.random() * 5000
});
}
// 设置null值
data.push({
id: i,
country: null,
downloads: Math.round(Math.random() * 20000),
sales: Math.random() * 10000,
expenses: Math.random() * 5000
});
// the grid
var theGrid = new FlexGrid('#theGrid', {
itemsSource: data,
allowAddNew: true,
allowDelete: true,
pasted: function (s, e) {
alert("pasted");
console.log(e);
console.log(s.getCellData(e.row, e.col));
},
pastedCell: function (s, e) {
alert("pastedCell");
}
});
// toggle new row position
document.getElementById('newRowAtTop').addEventListener('click', function (e) {
theGrid.newRowAtTop = e.target.checked;
});
}
这段代码贴到App.js中可查看效果:
https://demo.grapecity.com.cn/wijmo/demos/Grid/Rows/AddingRemoving/purejs
您可以试试在在线Demo上重现一下问题,如果在线Demo上无法重现,请提供一个Demo,谢谢~
页:
[1]