Solved

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

Posted on 2014-07-18
2
251 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 500 total points
Comment Utility
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 33

Author Closing Comment

by:Mike Eghtebas
Comment Utility
Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now