gpt4 book ai didi

jquery - 将数据从桌面附加到 bootgrid 时搜索被破坏

转载 作者:行者123 更新时间:2023-12-01 01:45:40 24 4
gpt4 key购买 nike

我使用桌面从已发布的 Google 电子表格加载数据。

然后我想将 JSON 输出加载到 bootgrid。除了搜索被破坏之外,一切工作正常。不确定这是一个错误还是因为我只是通过“附加”来调用它。

var public_spreadsheet_url = "SPREADSHEETURL";

function init() {
Tabletop.init( { key: public_spreadsheet_url,
callback: showInfo,
simpleSheet: true } );
}

function showInfo(data, tabletop) {
data = tabletop.sheets("Sheet2").all();

for (var key in data[1]) {
$("#main-table thead tr").append('<th data-column-id="' + key + '">' + key + '</th>');
}

$("#main-table").bootgrid().bootgrid("append", data);
}

这是一个 fiddle ,可以更好地显示问题:http://jsfiddle.net/ZM8LW/

顺便说一句,由于声誉,我缺少 2 个标签:jquery-tabletop、jquery-bootgrid

最佳答案

您所做的一切都是正确的,但您忘记引用 jquery.bootgrid.css 文件。

更新:

第二件事是缺少 data-type 属性(请参阅更新的示例 here )。

关于jquery - 将数据从桌面附加到 bootgrid 时搜索被破坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25115734/

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