導航:首頁 > 編程語言 > extjs4grid修改

extjs4grid修改

發布時間:2023-02-05 02:47:41

Ⅰ extjs4 gridPanel loadmask怎麼修改默認的文字

你引用「ext-lang-en.js」了嗎?去掉它改引用「ext-lang-zh_CN.js」。

或者加入

if(Ext.LoadMask){

Ext.LoadMask.prototype.msg="讀取中...";

}

試試看。

Ⅱ extjs4.0 grid 選擇全選修改完數據刷新Grid列表後,全選按鈕還是勾中狀態,怎麼去除

var hd_checker = Ext.getCmp("#your grid id").getEl().select('div.x-column-header-checkbox');
var hd = hd_checker.first();
//清空表格頭的checkBox
if(hd.hasCls('x-grid-hd-checker-on')){
hd.removeCls('x-grid-hd-checker-on');
}

該方法僅限於4.1
4.0的話應該也可以用,但要去查下那個Column Header Checkbox是不是使用的x-grid-hd-checker-on這個Cls

Ⅲ extjs 修改grid 中特定列的顯示內容

//這個屬性改成這樣就可以了
renderer:function(value,cellmeta,record,rowIndex,columnIndex,store){

if(!Number(record.data["accountId"])&&!record.data["accountName"])
return"";

return"[00"+Number(record.data["accountId"])+"]"+record.data["accountName"];
}

Ⅳ extjs4中 grid中title字體顏色如何修改

可以這樣做

vargrid=Ext.create('Ext.grid.Panel',{
title:'<spanstyle="color:#顏色代碼;">我的代辦</span>'
//config
});

Ⅳ extjs4 怎麼動態的修改grid的title

對創建的Grid使用setTitle()就可以了~

var grid = Ext.create('Ext.grid.Panel', { ... } );
grid.setTitle('你想修改的標題名稱');

Ⅵ Extjs4中gridPanel可編輯問題

在你放到gridpanel裡面的可編輯控制項的定義上加validater這個屬性。這個屬性的值是一個校驗方法,在你的校驗方法裡面判斷值然後去改變其後行的狀態

Ⅶ Extjs4更新grid bbar中的信息

pagingtoolbar沒有直接修改text的方法


如果要刷新這里的數據,只能重新載入一下這個store


要跳轉到當前頁數,需記錄當前的頁碼


//表格store
varstore=Ext.create('Ext.data.Store',{});

//在刪除按鈕的監聽那裡,重新載入這個store
store.load({
params:{
//這里的start需根據當前頁碼計算出來
start:0
}
});

Ⅷ ExtJs4 獲取grid.panel中的被修改數據,該怎麼處理

Ext.grid.EditorGridPanel afterEdit事件,就是每次編輯完一個列之後就提交到後台進行修改操作

傳回的參數有
e.grid-grid本身。Thisgrid
e.record-正在編輯的record。Therecordbeingedited
e.field-正在編輯的欄位名。Thefieldnamebeingedited
e.value-正在設置的值(value)。Thevaluebeingset
e.originalValue-在編輯之前的原始值。Theoriginalvalueforthefield,beforetheedit.
e.row-grid行索引。Thegridrowindex
e.column-grid行索引。Thegridcolumnindex
listeners:{
afterEdit:function(e){
e.record正在編輯的record。

}

e.field - 正在編輯的欄位名

e.value - 正在設置的值(value)。

e.originalValue - 在編輯之前的原始值。

Ⅸ 使用extjs ,直接在grid上編輯後,如何將整個修改的數據行 傳到後台並解析成datatable

呃 這個很簡單啊 grid修改編輯後 其實它自己已經記錄了你所修改的數據
你只需要獲取並訪問後台就行了
editor.on({
scope: this,
afteredit: function(roweditor, changes, record, rowIndex) {
Ext.Ajax.request({
url : localhostURL + '/Ad.do',
method: 'POST',
jsonData :Ext.util.JSON.encode(record.data),
// record.phantom 是否為更新數據 ? true : false
params: {action:'saveOrUpdate'},
success: function(response) {
if(response.responseText == 'succ'){
Ext.example.msg('Message','Operation success!');
}else{
Ext.example.msg('Message','Operation failed!');
}
reloadAdStore();
}
});
}
});

你看 很簡單 就這樣就可以了

Ⅹ 如何改變grid某一個單元格的背景顏色

EXTJS4:如何改變grid某一個單元格的背景顏色
測試環境: ext-4.1.0-gpl

JS CODE:
Ext.onReady(function () {
Ext.widget('grid', {
title: 'Users',
store: {
fields: ['name', 'email', 'online'],
data: [
{ 'name': 'Lisa', "email": "[email protected]", "online": true },
{ 'name': 'Bart', "email": "[email protected]", "online": false },
{ 'name': 'Homer', "email": "[email protected]", "online": true },
{ 'name': 'Marge', "email": "[email protected]", "online": true }
]
},
columns: [
{
header: 'Name',
dataIndex: 'name',
renderer: function (value, meta, record) {
meta.tdCls = record.get('online') ? 'user-online' : 'user-offline';
return value;
}
},
{ header: 'Email', dataIndex: 'email', flex: 1 },
{ header: 'Online', dataIndex: 'online' }
],
width: 400,
renderTo: 'output'
});
});

所用到的自定義CSS :
.x-grid-cell.user-online
{
background-color: #9fc;
}
.x-grid-cell.user-offline
{
background-color: #ffc;
}

閱讀全文

與extjs4grid修改相關的資料

熱點內容
邏輯文件名和物理文件名關系 瀏覽:66
怎麼查一個網站的外鏈 瀏覽:675
linux下db2安裝時版本選擇 瀏覽:738
匯編編程用哪個軟體 瀏覽:486
仙樂下的歌在文件管理哪裡 瀏覽:477
115網盤解析工具2014 瀏覽:371
內圓弧銑刀怎麼編程 瀏覽:410
記事本文件轉word格式對齊 瀏覽:300
excel刪除恢復文件 瀏覽:290
三星s4怎麼切換3g網路 瀏覽:994
什麼是網站維護 瀏覽:314
文件夾錄像在哪裡 瀏覽:621
可以發語音的是什麼app 瀏覽:804
恢復手機桌面文件管理 瀏覽:627
用什麼軟體可以打開psd文件 瀏覽:459
公安有哪些警務app 瀏覽:150
生意轉租用什麼app 瀏覽:683
廣義的網路信息保密性是指 瀏覽:657
qq背景唯美簡約圖片 瀏覽:292
sky網路電話怎麼收費 瀏覽:599

友情鏈接