ASP.net中的网格行数据格式 [英] Grid row data formating in ASP.net

查看:62
本文介绍了ASP.net中的网格行数据格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

太好了,如果可以让我:

如果文本的长度变大或变大,如何设置或修复网格行数据的文本宽度.

所以我想显示原为("Code Project.com")的文本

该格式应为以下格式

Code Pro ...


最后,Grid列的宽度一定不能增加.


谢谢
Shahnawaz

Greatful if can let me :

how to set or fix the grid row data text width, if length of the text gone big or larger.

So I want to display the text which was ("Code Project.com")

This should be in the below format

Code Pro...


Finally the width of the column of Grid must not get increased.


Thanks
Shahnawaz

推荐答案

在网格中保留固定宽度的列.

在网格的RowDataBound ItemDataBound 事件中,逐列遍历,检查长度,并根据需要设置文本(一定长度后带有省略号).也可以按原样将工具提示设置为全文.试试吧!
Keep fixed width column in your grid.

In your RowDataBound or ItemDataBound event of grid, traverse columnwise, check the length, set the text as you wish (with an ellipses after a certain length). Also can set a tooltip as full text as it is. Try it!


这篇关于ASP.net中的网格行数据格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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