Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 20, 2013 05:29 AM by velambath
Jan 16, 2013 04:05 PM|LINK
I use a gridview control to display the data from database. However, there are some columns have large text, these text automatically turns to a new line which is not good. How can I adjust the column width based on its content?
Jan 16, 2013 05:11 PM|LINK
Click the smart tag on the upper right corner of your GridView control and select Edit Columns. Go to each of your columns and under Styles -> ItemStyle set the Wrap property to False.
Jan 16, 2013 06:20 PM|LINK
for the column(s) you are having this lengthly text apply a css property : white-space:nowrap;
Hop ths will solve your issue :)
Jan 17, 2013 01:46 AM|LINK
Thank you lspence, i set autogeneratecolumns property to true.. so, i cannot set the ItemStyle via edit columns. But i think it will help next time if i use manaully bind gridview columns.
Jan 17, 2013 01:47 AM|LINK
Your answer does solve my issue. Thanks you.
Jan 20, 2013 05:29 AM|LINK
Very happy to hear that . . . : )
enjoy . . have a nice day