This is a migrated thread and some comments may be shown as answers.

Break the content in radgrid column

5 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 19 Sep 2011, 08:30 AM
Hi
I'm using Radgrid and its working fine.
I have one requirement.

In my radrgid I have the column called "Description" and it will contain huge text.
But in grid it showing the some of the content only.
Can I break the lines after some characters like after 20 characters like that.
I have used Itemstyle-width and headerstyle-width but nothing has worked.

please help me how to resolve this issue.

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Sep 2011, 08:47 AM
Hello Ram,

You can wrap the cell content by setting Wrap to True.
aspx:
<telerik:GridBoundColumn DataField="Name" HeaderText="Name">
    <ItemStyle Width="10px"  Wrap="True"/>
</telerik:GridBoundColumn>

Thanks,
Princy.
0
Ram
Top achievements
Rank 1
answered on 19 Sep 2011, 10:09 AM
Hi Princy,
Thanks for the reply.
But I want to break the content into new line after every 20 characters.
Its just enlarging the column.
0
Shinu
Top achievements
Rank 2
answered on 19 Sep 2011, 10:25 AM
Hello Ram,

You can make use of the ToolTip property as in the following thread.
WrapText in RadGrid HyperLink Column.

Thanks,
Shinu.
0
Ram
Top achievements
Rank 1
answered on 19 Sep 2011, 11:37 AM
Thanks Shinu.
It was helpful
0
Winni
Top achievements
Rank 1
answered on 19 Sep 2011, 12:05 PM
Hi Shinu ,
 
I modified the code as in the example given by you .It works fine except print and export .
Print function prints the contents on the radgrid .
I tried with "Wrap " and show the entire value in one line .Then only up to some  lenght it is showing .The remaing is chopped from grid and not coming on print also.

could you please suggest a solution to this ?
Tags
Grid
Asked by
Ram
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ram
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Winni
Top achievements
Rank 1
Share this question
or