easyui-propertygrid单元格失去焦点获取值





   
   
datagrid
 rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<script type="text/javascript" src="../jquery.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<script>

$(document).ready(function(e) {
	$('#dg').propertygrid({
		url:'', 
		loadMsg:'数据加载中,请稍后......', 
		border:false, 
		fitColumns:true, 
		remoteSort:false,
		singleSelect:true,
		scrollbarSize: 0,
		onClickRow:function(rowIndex,rowData){ 
			//失去焦点的时候获取值
			$("input.datagrid-editable-input").blur(
				function(){
					alert($(this).val());	
				}
			);
		}, 
		frozenColumns:[[ 
			{field:'ck',checkbox:true}
		]],
		toolbar:[ 
				{text:'刷新',iconCls:'icon-reload',handler:function(){ 
					Reload(); 
				}}, 
				{text:'添加',iconCls:'icon-add',handler:function(){
					alert('添加');	
				}}, 
				{text:'编辑',iconCls:'icon-edit',handler:function(){
					alert('编辑');
				}}, 
				{text:'删除',iconCls:'icon-cut',handler:function(){
					alert("删除");
				}}, 
				{text:'清选',iconCls:'icon-undo',handler:function(){ 
					$("#dg").datagrid("clearSelections"); 
				}} 
		],
		columns:[[
			{ field: 'name', title: '属性名', width:50, resizable: true },
			{ field: 'value', title: '属性值', width:200, resizable: false }	
		]]
	}); 
	
	
	var obj = {
		'total':100,
		'rows':
		[
			{ "field": "id", "name": "ID", "value": "222", "editor": "text"},
			{ "field": "name", "name": "名称",  "value": "", "editor": "text" },
			{ "field": "spacename", "name": "命名空间", "value": "", "editor":'text'},
			{ "field": "des", "name": "描述", "value": "", "editor": "text" }
		]
	};   
	$('#dg').propertygrid('loadData',obj); 
	
});
</script>


	
   
   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hi竹子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值