Customize a Gridview
I've created a Gridview and i'm populating it with data from my database. However the width of the columns changes depending on what data is in the cell. I've tried setting the individual columns ItemStyle and setting the width but it only seems to effect how the gridview in design view and not when the application is running.
Is there a property or something I can set that will make the rows single line as appose to multi-line and keep a constant width of the columns?
thanks,
Adrian.
[531 byte] By [
admol] at [2007-11-11 10:26:17]

# 2 Re: Customize a Gridview
I've read that they are but i do not know how to set them. There are not in the gridview properties or anywhere else i've looked.
Any ideas?
admol at 2007-11-11 23:12:51 >

# 5 Re: Customize a Gridview
Sorry, it doesn't appear to be a property of the web control.
# 6 Re: Customize a Gridview
I still havn't fixed my problem.
Any help would be great appreciated.
Thanks,
Adrian.
admol at 2007-11-11 23:16:58 >

# 7 Re: Customize a Gridview
Adrain, can we define just what your trying to do. It sounds as if you want fixed column widths and rows to be restricted to a single row height, correct? My understanding is the rows are wrapping now because you have more data than the column width can display, correct?
How would you want this to work?
# 8 Re: Customize a Gridview
Hi
I think you should view this article, it will solve your problem, sometimes setting width is not a solution and you dont want to wrap the text either.
View this article hopefully you will solve your problem
http://www.dev-archive.com/codemag/Article/17440/0/page/3