uiGrid开关行和列 [英] uiGrid switch rows and columns

查看:56
本文介绍了uiGrid开关行和列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是关于ui网格可能性的一个普遍问题.到目前为止,我在ui网格方面取得了巨大的成功.现在,我有一个用例,我想切换网格的行和列.

This is a bit of a general question into the possibilities of ui grid. I have had tremendous success with ui grid thus far. Now I have a use case where I want to switch the rows and columns of the grid.

基本上,我希望标题在第一列中垂直"显示,并使行成为列.

Basically, I would like the headers to be displayed 'vertically' in the first column and to have the rows become columns.

ui网格有可能吗?

推荐答案

据我所知,UI-grid不支持此功能.我怀疑你能不能做到这一点.可以尝试动态构建ColumnsDef和Data并将其传递给gridOptions.否则添加额外的列,这应该是您将传递所有标头值的第一列.更改单元格的背景,使其看起来像标题单元格.现在添加第二列,您将在其中传递整个第一行的值.完全隐藏原始标题行.现在看,您已经获得了所需的网格........:)

As far as i know UI-grid doesn't support this. I doubt if you can do that. May be try building ColumnsDef and Data dynamically and pass it to gridOptions. Or else add extra column and this should be the first column where you will pass all the header values. Change the background of the cells to look like header cells. Now add second column where you pass the entire first row values. Hide the original header row completely. see now u got your required grid........ :)

这篇关于uiGrid开关行和列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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