如何将GridView中的标题设置为一行而不是多行 [英] How to set the headers in the GridView to be in one line instead of mutliple lines

查看:166
本文介绍了如何将GridView中的标题设置为一行而不是多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的可滚动GridView,其中包含许多带有换行符的标题,但我不解释为什么GridView在多行中显示这些数据.我希望所有标题都在一行中. 该怎么做?

顺便说一句,GridView绑定到StoreProcedure.所以我没有< boundfield>或< templatefield>

I have a big scrollable GridView that contains many headers that have a line break and I don''t why the GridView shows these data in more than one line. I want all the headers to be in one line. How to do that?

By the way, the GridView is bound to StoreProcedure. So I don''t have <boundfield> or <templatefield>

推荐答案

我认为您需要这样说...

您的标题文本是这样的……第1列用于……",那么它将像这样显示..

第1列是
用于.."

我说的对吗?

并且您需要显示类似第1列用于..."

因此,您需要将具有此类属性的标头应用于CSS类...
i think you need to say like this...

your header text like this... "Column 1 is Used For.." then it will be displayed like this..

"Column 1 is
Used For.."

m i right..?

and you need to display like "Column 1 is Used For..."

so you need to apply css class for header with the property like this...
.HeaderText
{
white-space:nowrap;
}


您可以拥有Jquery.append( text ).addClass()
You can have Jquery.append(text).addClass()


这篇关于如何将GridView中的标题设置为一行而不是多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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