2020年6月8日 星期一

[Webix] 第三章:Widgets - 6.SpreadSheet

Webix Pro 提供的 Complex widgets,適合模擬線上編輯Excel(類似Google Document),

畫面呈現:


程式碼:
//webix.ready() function ensures that the code will be executed when the page is loaded
webix.ready(function(){
//object constructor
webix.ui({
view:"spreadsheet",
//loaded data object
data: base_data
});
});


重要屬性:

data:資料來源,可以是Json或是JSArray。(id為鍵值,Value代表顯示文字)

重要事件:


重要方法:

parse():帶入資料。

主要研究方向:

1.是否能直接線上取得編輯好的文件,而不是單純使用檔案功能。(取代瑞太後台的匯入匯出功能)
可以,編輯完直接取得該元件的資料內容即可直接使用其資料做動作。
測試畫面:


測試結果:

測試程式碼:
webix.ready(function(){
webix.ui(
{rows:[ {
view:"toolbar",
id:"myToolbar",
cols:[
{ view:"button", id:"LoadBut", value:"Load", width:100, align:"left" },
{ view:"button", value:"Save", width:100, align:"center" },
{ view:"button", value:"Info", width:100, align:"right",click:function(){
console.log($$("sheet").config.data)
} }
]
},{
view:"spreadsheet",
id:"sheet",
toolbar: "full",
data:{
sheets: [
{
name: "Tab 1",
content:{
data:[
[1,1,"Page 1"]
]
}
},
{
name: "Tab 2",
content:{
data:[
[1,1,"Page 2"]
]
}
},
{
name: "Tab 3",
content:{
data:[
[1,1,"Page 3"]
]
}
}
]
},
bottombar:true
}]});
});

[ASP.Net]GridView自訂分頁處理

  ASP.Net的GirdView在每次分頁處理時都會在重新抓取所有資料在進行分頁,遇到大量資料或是設計不良的情況下,在切換時頁面會卡住,造成使用者體驗不佳。 可以透過GirdView內建的參數以及SQL OFFSET語法來替代原先的分頁處理,以下為步驟說明 1.asp...