ASP.NET:GRIDVIEW:如何连续删除整个文本

ren*_*ind 1 c# asp.net gridview

我需要在GridView的RowDataBound事件中连续删除整个文本(甚至是文本/单元格之间的空格).可能吗?

rom*_*n m 7

C#

在RowDataBound事件上

e.Row.Style.Value = "text-decoration:line-through;"
Run Code Online (Sandbox Code Playgroud)

这就是你的GridView的渲染方式,它的工作原理!

<table>
<tr style="text-decoration:line-through;">
<td>some text</td>
<td>some text</td>
</tr>
<tr style="text-decoration:line-through;">
<td>some text</td>
<td>some text</td>
</tr>
<tr style="text-decoration:line-through;">
<td>some text</td>
<td>some text</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)