2012-08-17 114 views

回答

1
<asp:TemplateField HeaderText="Body"> 
<ItemTemplate> 
<div style="overflow:auto; height: 100px;"> 
    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Body")%>'></asp:Label> 
</div> 
</ItemTemplate> 
</asp:TemplateField> 

在你的gridview中使用這種方式來設置溢出數據。這顯示滾動條。

+0

對不起,它是Winforms,但如果在Winforms中絕對沒有辦法,我會將此標記爲答案並使用WPF控件 – l46kok 2012-08-17 09:07:23

+0

好吧,我會試着弄清楚你需要什麼 – 2012-08-17 10:28:32