Click here to Skip to main content
14,836,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am enter the description table in grid view it expand with the description and effecting the other columns.Even i fixed the size and height ? :)


I have a GridView with 3 Columns

- Name

- Address

- Description


When I bind it with the data, and If the Description column has more text than the width I have specified, It expands and move/change size of other columns.

Now, how can I make the width of all the 3 columns fixed width.

Please help me to fix this problem.

Thank You.
Posted
Updated 28-Jul-10 5:50am
v2
Comments
Sandeep Mewara 28-Jul-10 2:27am
   
Your question is not at all clear. Please re-phrase and add more details about your issue.
koool.kabeer 28-Jul-10 6:15am
   
Yeah not clear.........
thatraja 28-Jul-10 6:29am
   
confusing one....please complete your question.
anupkulkarni85 28-Jul-10 6:36am
   
suppose it had the three column name,address and description.When the description contain more data then name and address aligment is change
William Winner 28-Jul-10 11:55am
   
just a friendly tip. I wouldn't use your email address as your username unless you want to get a lot of spam.
PunkIsNotDead 28-Jul-10 12:00pm
   
send spam to kulkarni58@gmail.com :) :laugh: now seriously... Why don't you add a subString to Description in case it exceed some characters (like 50 or something)

You can set the gridview column width at design time using width=<some value>



Or, you set the width dynamically like this[^]
   
Am assuming you are talking about winform gridview, then in the columns editor(columns property) of the gridview there is a propert called "AutoSizemode" property that controls how the data fills the columns ...
   
There is solution that Item-style-Align property
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900