gpt4 book ai didi

slickgrid - 无法让最小的示例工作

转载 作者:行者123 更新时间:2023-12-02 23:06:25 24 4
gpt4 key购买 nike

大家好,

我正在尝试按照 getting started instructions 操作 SlickGrid 工作.

但是我的网格不可编辑。当我点击单元格时没有任何反应。

这是我的 HTML/JS。我确认已找到所有 src。

<!doctype html>
<html>
<head>
<meta charset="utf-8">

<title></title>

<link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="slick.grid.css" type="text/css" media="screen" charset="utf-8" />

<style>

</style>

<script src="lib/firebugx.js"></script>

<script src="lib/jquery-1.7.min.js"></script>
<script src="lib/jquery-ui-1.8.16.custom.min.js"></script>
<script src="lib/jquery.event.drag-2.0.min.js"></script>

<script src="slick.core.js"></script>
<script src="plugins/slick.cellrangedecorator.js"></script>
<script src="plugins/slick.cellrangeselector.js"></script>
<script src="plugins/slick.cellselectionmodel.js"></script>
<script src="slick.editors.js"></script>
<script src="slick.grid.js"></script>


<script type="text/javascript">
var rows = [
{
field_1: 2,
field_2: "value2",
id: 1
}, {
field_1: 3,
field_2: "value4",
id: 2
}
];

var columns = [
{
name: "Address",
field: "field_1",
id: "field_1",
},
{
name: "Rating",
field: "field_2",
id: "field_2",
},
];

var options = {
enableCellNavigation: true,
editable: true,
asyncEditorLoading: false,
autoEdit: false,
};

$(document).ready(function(){

//See https://github.com/mleibman/SlickGrid/wiki/Getting-Started
//for information on setting up SlickGrid.
var slickgrid = new Slick.Grid("#platewell_grid", rows, columns, options);
$('#platewell_grid').show();
slickgrid.setSelectionModel(new Slick.CellSelectionModel());
slickgrid.updateRowCount();
slickgrid.render();
});
</script>

</head>
<body>
<div style="width:600px;">
<div id="platewell_grid" style="width:100%;height:500px;"></div>
</div>
</body>
</html>

最佳答案

您的网格不可编辑,因为您尚未在列定义中指定任何编辑器。

关于slickgrid - 无法让最小的示例工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8232991/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com