如何在垂直方向上显示gridview [英] How to display the gridview in vertical direction

查看:89
本文介绍了如何在垂直方向上显示gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在数据表中有一些数据,并将其绑定到网格视图,看起来像这样

header1 header2
值1值2

但我想以这种方式显示

header1 value1
header2 value2

我将数据存储在像
这样的datable中

Hi
I have some data in datatable and i am binding it to the grid view and it looks like this

header1 header2
value1 value2

but i want to display in this way

header1 value1
header2 value2

I am storing the data in datable like

dt.columns.add("header1")
dt.columns.add("header2")
dr.rows("header1")=value1
dr.rows("header2")=value2

dt.rows.add(dr)

推荐答案

您可以将以下标签指定为HeaderStyle

You can assign the below tag as your HeaderStyle

<style>

.verticaltext {

writing-mode: tb-rl;

filter: flipv fliph;

}

</style>

HeaderCssClass="verticaltext"


显示垂直DataGrid中的行 [ ^ ]可能有帮助.


选中此

格式化的垂直DataGrid Web控件 [
Check this

Formatted vertical DataGrid web control[^]


这篇关于如何在垂直方向上显示gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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