简体   繁体   English

wijmo网格-在wijmo网格中将行转换为列,将列转换为行

[英]wijmo grid - convert rows to columns and columns to rows in wijmo grid

I am using wijmo grid in my angular4 application. 我在我的angular4应用程序中使用wijmo网格。 The problem is that while converting rows to columns and columns to rows in wijmo grid. 问题在于,在wijmo网格中将行转换为列,将列转换为行。 How can I achieve transpose of wijmo grid..? 如何实现wijmo网格的转置?

  data = this.getData();
  getData() {
    let countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','),
    data = [];
    for (let i = 0; i < countries.length; i++) {
      data.push({
        country: countries[i],
        sales: Math.random() * 10000,
        expenses: Math.random() * 5000,
        downloads: Math.round(Math.random() * 20000)
      });
    }
    return new CollectionView(data);
  }

HTML: HTML:

 <wj-flex-grid [itemsSource]="data">
 </wj-flex-grid>

On various requests from the Wijmo users, Wijmo team created a demo sample for transposed view of FlexGrid. 根据Wijmo用户的各种要求,Wijmo团队为FlexGrid的转置视图创建了一个演示示例。 Please refer to the following demo fiddle sample for reference: Code https://jsfiddle.net/Wijmo5/tce6ro57/ 请参考以下演示小提琴示例以获取参考: Code https://jsfiddle.net/Wijmo5/tce6ro57/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM