如何在asp.net中使用gridview设置allignmnet问题 [英] how to set allignmnet issues with gridview in asp.net

查看:70
本文介绍了如何在asp.net中使用gridview设置allignmnet问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,



我有一个gridview,它显示了一些列,如UserID,TaskID,Task,ReminderDate,Submit。

It很好地显示gridview whenevr任务包含更少的字符..



如果任务字段中没有更多的字符,则gridview的结构正在改变(高度和不应该发生的宽度)。



请帮我解决这个问题

Hello Experts,

I have a gridview that shows few columns like UserID,TaskID,Task,ReminderDate,Submit.
It is good to show gridview whenevr the Task contains less characters..

If there are more no of characters in Task field then the structure of the gridview is changing(height and width which should no0t happen).

please help me to solve this issue

推荐答案

你好



设置为ItemStyle属性

如下所示



*<< ItemStyle Wrap =trueWidth =100px>
Hello

Set to ItemStyle Property
Like below

*<<ItemStyle Wrap="true" Width="100px" >


HI,



您可以使用自动换行属性风格中的列。





You can use the word-wrap property to the column in the style.

word-wrap: break-word;





请参阅以下链接:



div中的CSS自动换行



这对你有帮助。



谢谢



Refer the following link:

CSS word-wrapping in div

This will help you.

Thanks


这篇关于如何在asp.net中使用gridview设置allignmnet问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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