locked
Datagrid output is cut off RRS feed

  • Question

  • User959083220 posted

    Hello,

    I have a datagrid:

    <asp:DataGrid id="results"
                    ShowHeader="false"
                    ShowFooter="false"
                    EnableViewState="true"
                    GridLines="None"
                    AutoGenerateColumns="false"
                    AllowSorting="False"
                    AllowPaging="true"
                    PageSize="5"
                    PagerStyle-Mode="NextPrev"
                    PagerStyle-NextPageText="[ Next Page ]"
                    PagerStyle-PrevPageText="[ Previous Page ]"
                    PagerStyle-HorizontalAlign="Center"
                    PagerStyle-CssClass="pager"
                    PagerStyle-Width="100%"
                    Width="100%"
                    runat="server" OnPageIndexChanged="results_PageIndexChanged">
    <Columns>
        <asp:TemplateColumn>
        <itemTemplate>
        <div class="content_Text_Datagrid_media">
       <%# DataBinder.Eval(Container.DataItem, "Title")%><br />
        <b>Date:</b> <%# DisplayDate(DataBinder.Eval(Container.DataItem, "cDate").ToString())%><br />
        <b>Description:</b> <%# DataBinder.Eval(Container.DataItem, "Description").ToString()%>
        <br /><br />
        </div>
         </itemTemplate>
      </asp:TemplateColumn>
    </Columns>

    </asp:DataGrid>

    The information feeding the datagrid is stored in MS access 2003 database. The text in the field description is stored as "Memo" and it contains plain text and some html tags. The text on the databse is stored properly, all the text that needs to be displayed to the web page is in the database.

     Problem: The text of the description field is cut off (only the first lines are displayed, not the whole text that is the table) when displayed to the web page. Please, help.

    Thank you.

    Christian

    Tuesday, May 12, 2009 12:44 PM

Answers

  • User-821857111 posted

    There are a number of odd reasons why JET truncates a MEMO field to 255 characters.  Could you show the SQL that you are using to obtain the data to help narrow them down?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 13, 2009 2:13 AM
  • User-1199946673 posted

    There are a number of odd reasons why JET truncates a MEMO field to 255 characters. 

    Correct. This can usually be avoided by NOT using any functions in the SQL, but returning the whole field, and using ASP.NET code behind to do some editing

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 14, 2009 8:30 AM

All replies

  • User-821857111 posted

    There are a number of odd reasons why JET truncates a MEMO field to 255 characters.  Could you show the SQL that you are using to obtain the data to help narrow them down?

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 13, 2009 2:13 AM
  • User-1199946673 posted

    There are a number of odd reasons why JET truncates a MEMO field to 255 characters. 

    Correct. This can usually be avoided by NOT using any functions in the SQL, but returning the whole field, and using ASP.NET code behind to do some editing

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, May 14, 2009 8:30 AM