?
Solved

gridview column extends page for miles

Posted on 2007-03-28
1
Medium Priority
?
350 Views
Last Modified: 2012-08-14
I have a gridview with a label in it that is extending it's content page as well as the master page for miles across when there is a continuous entry of characters without spaces.  For example 100 d entries, dddddddddddddd....

 I've tried adding item-style wrap and item-style width to the field, but doesn't help, those d's just go straight across without breaking to next line.

I have to have whatever is entered, regardless of how bizarre the entry may be, so no truncation.

Is there a way to break to next line after so many chars?  I would have thought the item-style settings would have fixed, but no.

thanks

<ajax:UpdatePanel ID="updatePanelSecurityGroups" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:GridView ID="_gridViewClientSecurityGroups" runat="Server" Width="100%" AutoGenerateColumns="False" OnRowCommand="_gridViewClientSecurityGroups_RowCommand" OnRowDataBound="_gridViewClientSecurityGroups_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="Group Name">
                        <ItemTemplate>
                            <b><asp:Label ID="LabelGroupName" runat="Server"><%# Eval("SHORT_NAME")%></asp:Label></b><br />
                            <asp:Label ID="LabelDescription" CssClass="dataTableSmall" runat="Server"><%# Eval("Description")%></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="CLIENT_SHORT_NAME" HeaderText="Client" />
                    <asp:TemplateField HeaderImageUrl="~/Library/Key.gif" ItemStyle-Width="0%">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLinkMangePermissions" runat="Server" ImageUrl="~/Library/Key.gif" ToolTip="Manage Permissions" ></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ASSOCIATE_COUNT" HeaderText="Members" ItemStyle-Width="0%" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField DataField="CREATED_BY" HeaderText="Created By" />
                    <asp:TemplateField HeaderImageUrl="~/Library/Icon-Trash.gif" ItemStyle-Width="0%">
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButtonDeleteGroup" runat="Server" ImageUrl="~/Library/Icon-Trash.gif" AlternateText="Delete" CommandName="DeleteGroup" CommandArgument='<%# Eval("SECURITY_GROUP_ID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </ContentTemplate>
    </ajax:UpdatePanel>
0
Comment
Question by:kellyclu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
Elvio Lujan earned 2000 total points
ID: 18812057
the wrap don't work when there are no spaces...
i suggest you use that way...

   <asp:Label ID="LabelDescription" CssClass="dataTableSmall" runat="Server"><%# Eval("Description").ToString.SubString(0,20) & "..."%></asp:Label>
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question