?
Solved

Datagrid Column header size extending to anchored position?

Posted on 2006-04-18
1
Medium Priority
?
741 Views
Last Modified: 2010-05-18
Hi!

I have a datagrid that is populated with data. I have the grid anchored to the right. When I open the form in my application I can re-size the window and the datagrid expands to the right. The buttons of the datagrid (add, remove, etc) all resize to fit as well.

The problem is, the last column does not stretch to fit the datagrid. It's a text field called "Summary". This column has a set width of 120 as defined by the table style for the datagrid. Despite the datagrid resizing, it does not stretch the end of this column when you resize the window.

Does anyone know how I can accomplish this?
0
Comment
Question by:dmct3
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 16480005
You can use a table style, and define column widths based on a percentage of grid width, instead of fixed pixels.

style.ColumnWidth = Me.DataGrid1.Width * .3

Bob
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

839 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