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

wrap="false" does not work in grid

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 03 Dec 2008, 08:33 PM
2008.3.1125.35
I defined 2 radio buttons in GridTemplateColumn and I want them to display horizontally without wrapping.
I tried setting ItemStyle wrap="false" or larger width, and GridTemplateColumn AllowResize="false".    It still wraps when the browser window is shrunk.

The only way I can make it not re-size is using a table and set nowrap in TD, but it caused another problem.  The grid is using Web20 skin and ItemStyle BackColor is GreenYellow, and it leaves a bottom border line that I could not get rid of unless I explicitly set it to border none in TD.

Are these the necc. workaround?

                            <table>
                                <tr>
                                    <td nowrap style="border-style:none">
                                        <asp:RadioButton ID="rdo1" Text="test1" GroupName="Opt" runat="server" />
                                        <asp:RadioButton ID="rdo2" Text="test2" GroupName="Opt" runat="server" />
                                    </td>
                                </tr>
                            </table>

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 04 Dec 2008, 09:11 AM
Hi Lenny_shp,

Internet Explorer (which I suppose that you are using) has some limitations with regard to the disabling of text wrapping.

You need this workaround, but I suggest that you use a simple <div> with no table around the two checkboxes. You can set width for the div and in this case you don't need to disable text wrapping at all - the div will not shrink below the set width.


Sincerely yours,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or