留言板

Alloy UI Datatable change Editor Depending on Record Type not By column....

Shantaram Tupe,修改在9 年前。

Alloy UI Datatable change Editor Depending on Record Type not By column....

New Member 帖子: 2 加入日期: 14-8-11 最近的帖子
Hello guys ,
I want to edit cell depending on its type (text , radio ,dropdown etc) means depending on what value it contains on its double click event ...
I don't want editor by column. How Can I achive this....???

My data for datatable is from serveResource()....JSON object ....

My Column definition is ....



		
.....
<script src="http://cdn.alloyui.com/2.5.0/aui/aui-min.js"></script>
<link href="http://cdn.alloyui.com/2.5.0/aui-css/css/bootstrap.min.css" rel="stylesheet">
--------------------------------------------------------------------------

YUI().use(
			'aui-datatable',
			'aui-io-request',
			'datatable-sort',
			'datatable-paginator',
			function(Y){
--------------------------------------------------------------------------

		var columns = [
									{
										key: ' ',
										label: ' ',
										width: '0px',
										sortable : false ,
										editor : false ,
									},
								    {
										key: 'keyName',
										label : 'Property Name',
										sortable: true,
										editor : false ,
								    },
								    {
										key : 'description',
										sortable: true,
										editor : false ,
								    },
								   { 
										key : 'value',
										sortable: true,
										editor: "[b] Depending on value (text,radio,dropdown ...)[/b] ",

								   },
							  ];