Wrox Programmer Forums
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2006, 02:40 PM
Registered User
 
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default GridView Control

I am using a GridView control to display data but have run into a couple of problems. First, I would like to have two heading lines with the top heading line overlapping multiple column headings. Since it appears this can't be done with the GridView control I decided to create a table immediately above the GridView control for the overlapping headings. Now, the problem I'm having is that I can't control the width of the columns in the GridView control. I have altered the column width, item width, header width, and footer width properties for the columns and these work while in display mode. However, when I execute the code the columns revert to width of the widest data field. How can I control column width at execution?

 
Old March 13th, 2007, 11:48 AM
Registered User
 
Join Date: Mar 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

While I'm sure Microsoft are more than happy with the way their grid works, I'm not! You either have to sit and write hundreds of code lines to get a simple task to work, or you give up and purchase a 3rd party alternative. Have a look for ComponentOne. Great kit.

Cheers,
Tull.

 
Old March 14th, 2007, 10:57 PM
Registered User
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
You need to set the Column width of each column in a table at runtime.
For setting the column width you have to make some calculation also.
First get the column width of Datagrid column at runtime and calculate and set the column width of table column.
Ketan N Sharma






Similar Threads
Thread Thread Starter Forum Replies Last Post
Paging in gridview control VadimZ ASP.NET 2.0 Professional 8 February 17th, 2010 02:12 AM
using gridview control, how to update? aaronabdiel ASP.NET 2.0 Basics 2 February 13th, 2008 08:41 AM
How to put a button control in a GridView control ryan.webb ASP.NET 2.0 Basics 2 December 28th, 2007 05:26 AM
User Control in a GridView Colonel Angus ASP.NET 2.0 Basics 4 August 13th, 2007 10:28 AM
Gridview control parameter ~ kutel ASP.NET 2.0 Basics 0 July 22nd, 2007 08:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.