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

[Solved] Text wrap not working for GridTemplateColumn?

3 Answers 465 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 30 Jan 2013, 02:41 PM
Hi, I have the following GridTemplateColumn.  I want to set the width of the CompanyName column to 150px.  I have all the settings I thought I needed but it will won't wrap text? 

<telerik:GridTemplateColumn HeaderStyle-Width="150px"  ItemStyle-Width="150px" ItemStyle-Wrap="true" >
                <ItemTemplate>         
                    <table>
                        <tr>
                            <td style="border:none !important;"><asp:CheckBox ID="CheckBox1" runat="server"  /></td>
                            <td style="border:none !important;"><%# Eval("CompanyName") %></td>
                        </tr>
                    </table>     
                </ItemTemplate>
</telerik:GridTemplateColumn>

Thanks, Dave

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 30 Jan 2013, 02:52 PM
Hello,

Please try with below code snippet

how to wrap text in radgrid's column or label without space

Thanks,
Jayesh Goyani
0
David
Top achievements
Rank 1
answered on 30 Jan 2013, 02:52 PM
Solution:

I had a style set

 .rgRow td {
    white-space:nowrap;
}

I commented this style out and it allowed the RadGrid's settings take place.

0
Maria Ilieva
Telerik team
answered on 04 Feb 2013, 09:14 AM
Hi David,

Thank you for updating us on this issue and post the solution you have found.

Do let us know if further assistance is needed.

Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
David
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or