GridView BoundField文本对齐 [英] GridView BoundField text alignment

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

问题描述

我正在使用Gridview来显示一些数据,但我在网格视图边界字段中对齐文本时遇到了一些问题。



我必须证明文本的合理性gridview专栏,我使用下面的代码



I am using Gridview to show some data, but i am facing some problem in aligning the text in grid view boundfield.

I have to justify the text in gridview column, i am using below code

<asp:BoundField DataField="Description" HeaderText="Description" HeaderStyle-HorizontalAlign="left" ItemStyle-HorizontalAlign="Justify" />







但它没有用。任何建议最受欢迎




But it is not working. Any suggestion most welcome

推荐答案

请参考此链接



http://social.msdn.microsoft.com/Forums/en-US/wpf/ thread / ba58e84c-bcdc-49d6-b70b-cebb35d3f38e / [ ^ ]


<asp:BoundField DataField="MC" HeaderText="MC" SortExpression="MC">
     <ItemStyle HorizontalAlign="Center" />
</asp:BoundField>





只需发布答案,而不是指向其他网站的超链接!!



Just post the answer, instead of a hyperlink to another website!!


这篇关于GridView BoundField文本对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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