您好,这个问题我这里没能重现,参考:
- 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[i],
- 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/wi ... dingRemoving/purejs
|