EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 05:51:04 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
cannot addRow when using formatter in edatagrid mode
Pages: [
1
]
« previous
next »
Print
Author
Topic: cannot addRow when using formatter in edatagrid mode (Read 5974 times)
fen9ye
Newbie
Posts: 7
cannot addRow when using formatter in edatagrid mode
«
on:
June 08, 2014, 10:27:28 PM »
here is my code:
<th field="deptID" width="50" align="center"
editor="{
type:'validatebox',
options:{
required:true,
formatter:function(value,row,index){
var deptIDStr = value.toString();
while(deptIDStr.length<3){
deptIDStr = '0'+deptIDStr;
}
return deptIDStr;
}
}
}">deptID</th>
deptID is the idField,when I press the add Button,it doesn't work.
when I remove the formatter code,it works well.Please give me some hints
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: cannot addRow when using formatter in edatagrid mode
«
Reply #1 on:
June 09, 2014, 12:51:28 AM »
The 'validatebox' editor has no 'formatter' option. Please check your code carefully and correct it.
Logged
fen9ye
Newbie
Posts: 7
Re: cannot addRow when using formatter in edatagrid mode
«
Reply #2 on:
June 09, 2014, 09:15:13 PM »
after checking mycode,I find my formatter function wrong because lacking
if(value==null){
return ;
}
I'm so sorry for my careless.
I still have a question:How can I get a feedback after adding row in edatagrid mode?Can you give me a demo or some hints?
«
Last Edit: June 09, 2014, 09:17:15 PM by fen9ye
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: cannot addRow when using formatter in edatagrid mode
«
Reply #3 on:
June 10, 2014, 02:17:00 AM »
When added a new row, the 'onAdd' event fires. For more information please visit the edatagrid documentation
http://www.jeasyui.com/extension/edatagrid.php
.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...