Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Wrap="False" and Fixed width Gridview...

Posted on 2014-07-18
2
Medium Priority
?
294 Views
Last Modified: 2014-07-18
In a gridview like :

<ItemStyle HorizontalAlign="Left" Width="10px" Wrap="True" /> </asp:BoundField>

When set Wrap="False", it ignores Width="10px". It uses as much as it needs to display the data in full.

Question: Is there any way to have Wrap="False" and force not to exceed 10px?

visual studio 201 c#.

Thank you.
0
Comment
Question by:Mike Eghtebas
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 2000 total points
ID: 40204194
The simplest way would be to apply a CSS style to your page to add an overflow style to your td elements by adding the following to the HEAD section of your page:
<style type="text/css">
   td { overflow: hidden; }
</style>

Open in new window

Bear in mind that would apply to all td elements. If you just wanted it for the single column you would need to add the CssClass attribute to your ItemStyle and then create a named CSS style.
0
 
LVL 34

Author Closing Comment

by:Mike Eghtebas
ID: 40204202
Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

927 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