使用Ext GWT Grid进行行内排队 [英] Row within a Row with Ext GWT Grid

查看:122
本文介绍了使用Ext GWT Grid进行行内排队的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能有一个 RowExpander ,它不是HTML而是另一个Row?也就是说,一行有一个扩展[+]图标,然后展开时,子行看起来像一个子行?

例如,我有一个 List< ModelData> 就像这样:

  ModelData column1 = new BaseModelData(); 
column1.set(Date,11-11-11);
column1.set(Time,11:11:11);
column1.set Code,abcdef);
column1.set(Status,OK);

ModelData column2 = new BaseModelData();
column2.set Date,11-11-11);
column2.set(Time,12:11:11);
column2.set(Code,abcdef) ;
column2.set(Status,Failed);

ModelData column3 = new BaseModelData();
column3.set(Date,11-11 -11);
column3.set(Time,13:11:11);
column3.set(Code,abcedf);
column3.set (Status,Failed);

ModelData column4 = new BaseModelData();
column4.set(Date,11-11-11);
column4.set(Time,14:11:11);
column4.set(Code,abcdef);
column4.set(Status,Failed );

列表< ModelData> data = ...
data.add(model1);
data.add(model2);
data.add(model3);
data.add(model4);

而且这将会在网格中呈现为两列(由代码状态栏):

 日期|时间|代码|状态
-------------------------------------
11-11- 11 | 11:11:11 | abcedf | OK
[+] 11-11-11 | 12:11:11 | abcedf |失败
| ---> 11-11-11 | 13:11:11 | abcedf |失败
| ---> 11-11-11 | 14:11:11 | abcedf |失败

类似这样的内容。

更新:



我被告知解决方案将扩展 RowExpander 类和合并与 GridView 类。

解决方案

strong> GroupingView 和 TreeGrid ,并为您定制其中一个目的。它比尝试重用GridView的行渲染功能要安全得多。


Is is possible to have a RowExpander that is not HTML but rather another Row? That is, a row have a expand [+] icon then when expanded, sub rows appear like a "child-row""?

For example I have a List<ModelData> like this:

ModelData column1 = new BaseModelData();
column1.set("Date", "11-11-11");
column1.set("Time", "11:11:11");
column1.set("Code", "abcdef");
column1.set("Status", "OK");

ModelData column2 = new BaseModelData();
column2.set("Date", "11-11-11");
column2.set("Time", "12:11:11");
column2.set("Code", "abcdef");
column2.set("Status", "Failed");

ModelData column3 = new BaseModelData();
column3.set("Date", "11-11-11");
column3.set("Time", "13:11:11");
column3.set("Code", "abcedf");
column3.set("Status", "Failed");

ModelData column4 = new BaseModelData();
column4.set("Date", "11-11-11");
column4.set("Time", "14:11:11");
column4.set("Code", "abcdef");
column4.set("Status", "Failed");

List<ModelData> data = ...
data.add(model1);
data.add(model2);
data.add(model3);
data.add(model4);

And that this will be rendered in the Grid as two columns (Grouped by the Code and Status column):

         Date | Time     | Code   | Status
-------------------------------------
     11-11-11 | 11:11:11 | abcedf | OK
[+]  11-11-11 | 12:11:11 | abcedf | Failed
 |--->11-11-11 | 13:11:11 | abcedf | Failed
 |--->11-11-11 | 14:11:11 | abcedf | Failed   

Something like this.

Update:

I was advised that the solution would be to extends the RowExpander class and merge with GridView class.

解决方案

You can take a look at GroupingView and TreeGrid and customize one of them for you purposes. It is much safer than trying to reuse GridView's rows rendering functionality.

这篇关于使用Ext GWT Grid进行行内排队的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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