禁用GWT Grid中的特定列 [英] Disable a specific column in GWT Grid

查看:130
本文介绍了禁用GWT Grid中的特定列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以禁用gwt数据网格中的特定列..就像

  myColumn.setDisable(true) ; 

我的目的是防止选择 SelectionCell 在datagrid中。那应该是不可编辑的。

有什么办法可以达到这个效果?

解决方案

您有两种选择:

A。您可以创建自定义单元格,该元素在某些情况下会将元素设置为禁用条件。这是最接近你想要的,但它也可能有点让你的用户感到困惑 - 他们可能认为你的桌子坏了。

B。您可以使用SelectionCell删除列,并在其位置插入TextCell列。


Is there any way to disable a specific column in gwt data grid ..something like

myColumn.setDisable(true);

My purpose is to prevent the selection of a SelectionCell in the datagrid.That should be non editable ..

any way to achieve that ?

解决方案

You have two options:

A. You can create a custom cell which would render element set to disabled under certain conditions. This is the closest to what you want, but it may also be a little confusing to your users - they may think your table is broken.

B. You can remove column with SelectionCell and insert column with TextCell in its place.

这篇关于禁用GWT Grid中的特定列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆