GridViewDataColumn carriage returns

3 posts, 1 answers
  1. krisdoff
    krisdoff avatar
    12 posts
    Member since:
    Nov 2006

    Posted 07 Feb 2012 Link to this post

    Hi there,

    I have data that contains carriage returns, I want the cell to visually truncate the text instead of expanding the row vertically to accommodate it.  What are my options?

    Many thanks in advance
  2. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 07 Feb 2012 Link to this post

    Hi Chris,

     

    Have you checked this thread "Truncate display text in cell"



    Kind regards,
    Vanya Pavlova
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. krisdoff
    krisdoff avatar
    12 posts
    Member since:
    Nov 2006

    Posted 07 Feb 2012 Link to this post

    Great thanks; I elected to do the follwing:

     

     

    <telerik:GridViewDataColumn.CellEditTemplate>

     

    <DataTemplate>

     

    <TextBox AcceptsReturn="True" MaxHeight="250" Width="300" Text="{Binding Path=Value,Mode=TwoWay}"/>

     

    </DataTemplate>

     

    </telerik:GridViewDataColumn.CellEditTemplate>

     

    <telerik:GridViewDataColumn.CellTemplate>

     

    <DataTemplate>

     

    <TextBlock MaxHeight="18" Width="300" TextWrapping="NoWrap" Text="{Binding Path=Value}"/>

     

    </DataTemplate>

     

    </telerik:GridViewDataColumn.CellTemplate>

Back to Top