2015-06-01 26 views
-1

我想重置爲空的docId的價值。重置價值爲空的jQuery

你能告訴我如何做到這一點?

console.dir(dijit.byId("grid")); 
rowIndex = e.rowIndex; 
var item = this.getItem(rowIndex); 
var docId = this.store.getValue(item, "ID"); 
+1

請重寫這個問題的正確的英語,用適當的標點符號。這是現在寫的,這是不可理解的。我真的試圖爲你改寫它,但我沒有得到你想要的。什麼是m? – mplungjan

+0

在這裏,我想一個條件取決於文檔ID值,如果文檔ID爲空,將prefrom不同的任務 –

+0

我想重置這個值爲null ..... @ humble.rumble –

回答

0

使用unsetAttribute,像這樣:

rowIndex = e.rowIndex; 
var item = this.getItem(rowIndex); 
this.store.unsetAttribute(item, "ID"); 

,不要忘記刷新網格:

this.update();