Treeview Nested in a GridView

自古美人都是妖i 提交于 2019-12-24 05:59:35

问题


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.

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>

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

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


回答1:


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



来源:https://stackoverflow.com/questions/1578905/treeview-nested-in-a-gridview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!