gpt4 book ai didi

css - SlickGrid 单元格 float

转载 作者:行者123 更新时间:2023-11-28 13:22:54 25 4
gpt4 key购买 nike

我正在尝试使用 SlickGrid 创建一个网格以编辑 ASP.NET MVC 元素中的一些记录。

目前我无法弄清楚如何使记录实际显示为表格。 SlickGrid 显示如下: Grid as it is now

我一直在我的样式表和 javascript 文件中寻找可能导致此问题的因素,但我不确定我应该寻找什么。任何人都可以提供帮助吗?

据我所知,我非常严格地遵循了 SlickGrid 示例。

样式表包括:

<link href="../../Content/SlickGrid/slick.grid.css" rel="stylesheet" type="text/css" />
<link href="../../Content/SlickGrid/smoothness/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />

Javascript 包括:

<script type="text/javascript" src="../../Scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery-ui-1.10.0.custom/js/jquery-ui-1.10.0.custom.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.event.drag-2.2.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.jsonp-2.4.0.min.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/slick.core.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/plugins/slick.cellrangedecorator.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/plugins/slick.cellrangeselector.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/plugins/slick.cellselectionmodel.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/slick.editors.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/slick.remotemodel.js"></script>
<script type="text/javascript" src="../../Scripts/SlickGrid/slick.grid.js"></script>

Javascript 代码:

    var columns = [
{ id: "FileTypeId", name: "File Type", field: "FileTypeId", editor: Slick.Editors.Integer, sortable: false },
{ id: "DateCp", name: "Date/CP", field: "DateCp", editor: Slick.Editors.Date, sortable: false },
{ id: "VesselId", name: "Vessel", field: "VesselId", editor: Slick.Editors.Integer, sortable: false },
{ id: "FixtureNo", name: "Fixture No", field: "FixtureNo", editor: Slick.Editors.Text, sortable: false },
{ id: "VoyageNo", name: "Voy No", field: "VoyageNo", editor: Slick.Editors.Integer, sortable: false },
{ id: "VegoilVoyageNo", name: "Vegoil Voy No", field: "VegoilVoyageNo", editor: Slick.Editors.Text, sortable: false },
{ id: "Remarks", name: "Remarks", field: "Remarks", editor: Slick.Editors.LongText, sortable: false }
];
var options = {
editable: true,
enableAddRow: true,
enableCellNavigation: true,
asyncEditorLoading: false,
enableColumnReorder: false,
autoEdit: true
};

var grid;
$(function () {
$.getJSON('<%= Url.Action("BoxFiles", "Box", new { id = Model.Id }) %>', function (data) {
grid = new Slick.Grid("#files", data, columns, options);
grid.render();
});
});

最佳答案

slick.grid.css 样式表需要包含在之后 jquery-ui-1.8.16.custom.css

关于css - SlickGrid 单元格 float ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14473948/

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