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

[Solved] Problem with Wrap=False

1 Answer 206 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Nowak
Top achievements
Rank 1
David Nowak asked on 25 Jan 2008, 08:15 PM
One of the columns in my grid is a notes field.  I do not want this column to wrap.  I have set the style > wrap property of the column to false, but it still wraps when the program executes.

Is there something else that I need to set in order to prevent the wrapping of certain fields?

Thank You,

David Nowak.

1 Answer, 1 is accepted

Sort by
0
Fernandes
Top achievements
Rank 1
answered on 25 Jan 2008, 11:33 PM
Hi David,

I've tried to reproduce the problem you're facing, but I was able to set the "no wrap" setting.  (I've set a connection to the Northwind database).

I hope i've understood you're problem :)

Fernandes

Here's thecode:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Telerik Sample</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None">  
                <ExportSettings> 
                    <Pdf FontType="Subset" PaperSize="Letter" /> 
                    <Excel Format="Html" /> 
                </ExportSettings> 
                <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
                    DataKeyNames="EmployeeID" DataSourceID="SqlDataSource1" Dir="LTR" Frame="Border" 
                    TableLayout="Auto">  
                    <EditFormSettings> 
                        <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">  
                        </EditColumn> 
                    </EditFormSettings> 
                    <Columns> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="EmployeeID" 
                            DataType="System.Int32" FilterListOptions="VaryByDataType" ForceExtractValue="None" 
                            HeaderText="EmployeeID" ReadOnly="True" SortExpression="EmployeeID" UniqueName="EmployeeID">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="FirstName" FilterListOptions="VaryByDataType" 
                            ForceExtractValue="None" HeaderText="FirstName" SortExpression="FirstName" UniqueName="FirstName">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="LastName" FilterListOptions="VaryByDataType" 
                            ForceExtractValue="None" HeaderText="LastName" SortExpression="LastName" UniqueName="LastName">  
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Notes" FilterListOptions="VaryByDataType" 
                            ForceExtractValue="None" HeaderText="Notes" SortExpression="Notes" UniqueName="Notes">  
                            <ItemStyle Wrap="False" /> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                        Resizable="False" Visible="False">  
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                        Visible="False">  
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                </MasterTableView> 
                <GroupPanel ID="GroupPanel" Style="width: 100%;">  
                </GroupPanel> 
            </telerik:RadGrid> 
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
                SelectCommand="SELECT TOP 50 EmployeeID, FirstName, LastName, Notes FROM Employees">  
            </asp:SqlDataSource> 
        </div> 
    </form> 
</body> 
</html> 
 
Tags
Grid
Asked by
David Nowak
Top achievements
Rank 1
Answers by
Fernandes
Top achievements
Rank 1
Share this question
or