GridManager icon indicating copy to clipboard operation
GridManager copied to clipboard

无法实现排序功能

Open wYuanHpp opened this issue 9 years ago • 2 comments

其他功能完好,只是没法实现排序,不知道为什么,我的配置是参照demo做的。这是我的配置文件

 [{
		supportRemind: true
		,i18n:'zh-cn'
		,supportConfig: false
		,disableCache:false
		,disableOrder:false
		,supportSorting: true
		,supportDrag:true
		,supportCheckbox:false
		,supportAjaxPage:true
		,ajax_data:moveableTitle.getList()
		,ajax_url: 'data/test.json'
		,ajax_type: 'POST'
		,pageSize:10
		,query: {ex: '用户自定义的查询参数,格式:{key:value}'}
		,columnData: [{
			key: 'name',
			width: '20%',
			text: '名称'
		},{
			key: 'type',
			width: '50%',
			text: '类型',
			sorting: ''
		},{
			key: 'createDate',
			sorting: '',
			width: '20%',
			text: '创建时间'
		},{
			key: 'display',
			sorting: '',
			width: '20%',
			text: '显示'
		},{
			key: 'content',
			text: '内容',
			width:'10%'
		},{
			key: 'operation',
			width: '10%',
			text: '操作',
			template: function(operation, rowObject){//operation:当前key所对应的单条数据;rowObject:单个一行完整数据
				console.log(rowObject)
				return '<a name='+rowObject.key+' type="delete">删除</a><span>  </span><a name='+rowObject.key+' type="toggle">显示/隐藏</a>';
			}
		}
		]
	}

wYuanHpp avatar Jul 25 '17 07:07 wYuanHpp

首先需要确认的是,你是否已经看到了排序的事件源图标。 其次排序与分页功能是需要与后端数据交互才会生效,在你触发排序事件时, 查看一下你的请求头中是否增加了排序的参数

baukh789 avatar Jul 25 '17 09:07 baukh789

谢谢 已解决

wYuanHpp avatar Aug 02 '17 02:08 wYuanHpp