簡體   English   中英

GRIDVIEW不會在ASP.NET VB.NET的單元格中顯示完整的文本

[英]GRIDVIEW not shoing complete text in cells in ASP.NET VB.NET

我正在使用gridview從ASP.NET中的MSSQL獲取數據。 數據成功發送。 只有其中包含HTML且文本較長的兩列無法正確顯示。 每個單元格以33個字符結尾。 我正在獲取數據並將其放入LABEL。 代碼如下在gridview里面

<asp:GridView ID="GridView1" runat="server" Width="100%"
            Font-Names="Arial" Font-Size="Small" 
            AllowSorting="True" AutoGenerateColumns="False" 
            DataKeyNames="IDLessonLearnt" CellPadding="3" CellSpacing="3"
            DataSourceID="SqlDataSource1" PageSize="25" ShowFooter="True">
            <HeaderStyle ForeColor="White" Font-Bold="True" 
          BackColor="#25a0da" Font-Names="Arial" Font-Size="14px" Height="30px"></HeaderStyle>

            <Columns>

<asp:TemplateField ItemStyle-Width="600px" HeaderText="LESSONS / ISSUES" ItemStyle-HorizontalAlign="left">
 <ItemTemplate>
 <asp:Label ID="LessonLearned" runat="server" Text ='<%# System.Web.HttpUtility.HtmlEncode(Eval("LessonsIssues"))%>' ></asp:Label>
 </ItemTemplate>
 <ItemStyle Wrap="true" Width="600" />
 <HeaderTemplate>
 <asp:TextBox ID="txtLessonLearned" runat="server" onkeyup="filter_LessonLearned(this)" CssClass="texbox_header" 
                    Width="590px" placeholder="LESSONS / ISSUES" Text="">  </asp:TextBox>
    </HeaderTemplate>
    <ItemStyle HorizontalAlign="left" Width="600px" />
    </asp:TemplateField>

</Columns>
</asp:GridView>

我沒有使用任何編程方法,因此Gridview和數據源位於.aspx文件中。 即使解析數據庫中的html代碼,所有數據都可以正常運行,但僅顯示該單元格的33個字符。

有什么限制嗎? 有什么建議么。

提前

我發現該表具有varchar(max),但是我使用的存儲過程的列長為200,這是由另一位開發人員開發的。 我改為9000,現在可以使用了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM