此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【w5325698】截止到2008-08-02 19:00:34的历史汇总数据(不包括此帖):
发帖的总数量:12 发帖的总分数:170 每贴平均分数:14
回帖的总数量:78 得分贴总数量:21 回帖的得分率:26%
结贴的总数量:11 结贴的总分数:120
无满意结贴数:2 无满意结贴分:100
未结的帖子数:1 未结的总分数:50
结贴的百分比:91.67 % 结分的百分比:70.59 %
无满意结贴率:18.18 % 无满意结分率:83.33 %
值得尊敬
取消马甲机器人,请点这里:http://www.java2000.net/mycsdn/robotStop.jsp?usern=w5325698
楼主【w5325698】截止到2008-08-02 19:00:34的历史汇总数据(不包括此帖):
发帖的总数量:12 发帖的总分数:170 每贴平均分数:14
回帖的总数量:78 得分贴总数量:21 回帖的得分率:26%
结贴的总数量:11 结贴的总分数:120
无满意结贴数:2 无满意结贴分:100
未结的帖子数:1 未结的总分数:50
结贴的百分比:91.67 % 结分的百分比:70.59 %
无满意结贴率:18.18 % 无满意结分率:83.33 %
值得尊敬
取消马甲机器人,请点这里:http://www.java2000.net/mycsdn/robotStop.jsp?usern=w5325698
解决方案 »
- 求关于JS柱状图如何在图上添加超链接..
- dwr返回list,怎么填充到select
- 谁帮我调个程序
- 求教关于jQuery,后台返回responseXML数据流前台JS中如何取出?
- frameset src问题,不好意思 我 没什么分了。。。所以大家也看看吧!
- setFirstResult的问题,奇怪
- Extjs初学者,请教一个关于使用Ext创建一个表格的问题
- 关于Weblogic 下配了javamail session 后lookup时会出错?
- springmvc+mybias 连数据库连不上,没有报错
- maven利用cargo配置tomcat7x报错,求会的朋友帮忙看下
- tomcat5.0,如何在多个虚拟目录中配多个不同的连接池?
- 关于组合外键在hibernate中的配置方法。
......
})var 引用 定义成全局变量试试看
关注!
['1','1','1','1','1','1'],
['2','2','2','2','2','2'],
['3','3','3','3','3','3'],
['4','4','4','4','4','4'],
['5','5','5','5','5','5'],
['6','6','6','6','6','6'],
['7','7','7','7','7','7'],
['8','8','8','8','8','8'],
['9','9','9','9','9','9'],
['2','2','2','2','2','2'],
['3','3','3','3','3','3']
];
var ds=new Ext.data.Store({
proxy:new Ext.data.MemoryProxy(data),
reader:new Ext.data.ArrayReader({},[
{name:'wareid'},
{name:'warename'},
{name:'SearchWord'},
{name:'type'},
{name:'description'},
{name:'waregrounp'},
{name:'re'}
]),
scope:this
});
ds.load();
var cm=new Ext.grid.ColumnModel([
{id:'商品编号', header: "商品编号", width: 200,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank:false,
blankText:"商品编号不能空"
})) ,sortable: true, dataIndex:'wareid',scope:this},
{header: "商品名称", width: 120, sortable: true,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank:false,
blankText:'商品名称不能为空'
})),dataIndex: 'warename',scope:this},
{header: "时间", width: 120, sortable: true,editor:new Ext.grid.GridEditor(new Ext.form.DateField({
format:"y/m/d"
})) ,dataIndex: 'SearchWord',scope:this},
{header: "类型", width: 120, sortable: true,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank:false,
blankText:"类型不能为空"
})) ,dataIndex: 'type',scope:this},
{header: "描述信息", width: 135, sortable: true,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank:false,
blankText:"描述信息不能为空"
})) ,dataIndex: 'description',scope:this},
{header:"所在组",width:120,sortable:true,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank:false,
blankText:"组名不能为空"
})),dataIndex:'waregrounp',scope:this},
{header:"备注",width:120,sortable:true,editor:new Ext.grid.GridEditor(new Ext.form.TextField({
})),dataIndex:'re',scope:this}
]);
var ware = new Ext.grid.EditorGridPanel({
id:'ware',
ds:ds,
cm:cm,
enableDrag:true,
enableDrog:true,
viewConfig: {
forceFit: true
},
sm: new Ext.grid.RowSelectionModel({singleSelect:false}),
tbar:new Ext.Toolbar(["-",{
text:"添加",
icon:'add',
handler:function(){
var initValue={
wareid:'',
warename:'',
SearchWord:'',
type:'',
description:'',
waregrounp:'',
re:''
};
var newline=new Ext.data.Record(initValue);
ware.stopEditing();
ds.insert(0,newline);
ware.startEditing(0,0);
newline.dirty=true;
newline.modified=initValue;
if(ds.modified.indexOf(newline)==-1){
ds.modified.push(newline);
}
}
},"-",{
text:"删除",
handler:function(){
Ext.Msg.confirm('消息','确定删除吗?',function(btn){
if(btn=='yes'){
ds.remove(ware.getSelectionModel().getSelected());
}
});
},
icon:'delete'
},"-",{
text:"保存",
iconCls:'',
handler:function(){
var m=ds.modified.slice(0);
for(var i=0;i<m.length;i++){
var record=m[i];
var fields=record.fields.keys;
for(var j=0;j<fields.length;j++){
var name=fields[j];
var value=record.data[name];
var colIndex=cm.findColumnIndex(name);
var rowIndex=ds.indexOfId(record.id);
var editor=cm.getCellEditor(colIndex).field;
if(!editor.validateValue(value)){
Ext.Msg.alter('提示','请确保输入的数据正确',function(){
ware.startEditing(rowIndex,colIndex);
});
return;
}
}
}
var jsonArray=[];
Ext.each(m,function(item){
jsonArray.push(item.data);
});
Ext.lib.Ajax.request(
'post',
'Dowaredata',
{success:function(response){
Ext.Msg.alter(response.responseText,function(){ds.reload();
});
}},{failure:function(){
}}
);
}
}]),
width:600,
height:310,
frame:true,
title:'商品表',
iconCls:'icon-grid',
bbar:new Ext.PagingToolbar({
pageSize:10,
store:ds,
displayInfo:true,
displayMsg:'第{0}条到{1}条共有{2}条',
emptyMsg:'no data'
}),
scope:this
});
width:600,
height:350,
resizable:false,
items:[ware],
scope:this
});
window.addButton({
text:'退出',
id:'exit',
handler:function(){
window.close();
}
});
把列模型放到 new Ext.grid.EditorGridPanel({
})里面。
也就是
new Ext.grid.EditorGridPanel({
.....
cm:new Ext.grid.ColumnModel([
......
}),
.....
});因为要是可编辑的GridPanel每次生成的可编辑字段不一样。