树视图在GridView嵌套 [英] Treeview Nested in a GridView

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

问题描述

我已经动态添加一个TreeView,以在GridView控件中的单元格。问题是在TreeView的第一个节点的初始条目可能相当长。当页面呈现在TreeView最终增加我的GridView的列宽的大小,因为第一个节点不换行到下一行。

I have dynamically added a TreeView to a cell in a GridView Control. The problem is the initial entry in the first node of the TreeView can be quite long. When the page is rendered the TreeView ends up increasing the size of my GridView column width because the first node does not wrap to the next line.

当我查看源HTML的TreeView的第一个节点创建的表格单元格是这样的:

When I view the source HTML the table cell created by the TreeView for the first node looks like this:

<td style="white-space: nowrap;"> </td>

正由TreeView控件动态生成的风格,我想知道我怎么能覆盖此?

The style is being generated dynamically by the TreeView control and I am wondering how I can override this?

我已经使用CSS尝试,但我相信直列code覆盖在CSS的一切吗?

I have tried using CSS but I believe the inline code overrides everything in the CSS?

推荐答案

当您创建的TreeView的NodeWrap属性设置为True。这将停止CSS的产生。

Set the NodeWrap property to True when you create your TreeView. That will stop that CSS from being generated.

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

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