-
Jan 4th, 2022, 01:47 PM
#1
Thread Starter
Member
DataGridView question - extra space showing on headertext
I have a design-oriented question about the DataGridView control. I have a DataGridView with several columns set at design time. The column.AutoSizeMode is set to ColumnHeader. As expected, this results in the columns being sized to the width needed to show the text of the column header.
But there is a large amount of dead space after the text of the column header that I can't seem to get rid of and that also unnecessarily increases the column width – please see the attached image.
Does anyone know what setting controls this extra space?
-
Jan 4th, 2022, 02:18 PM
#2
Thread Starter
Member
Re: DataGridView question - extra space showing on headertext
I should have continued my hour long search a bit longer... this uniform space is where the sorting glyph appears when the column is sortable.
Here's a post on the subject on Stackoverflow with a rather intriguing solution posted by flodis. The post and solution is for c# but could be adapted for vb.net.
-
Jan 4th, 2022, 10:18 PM
#3
Re: DataGridView question - extra space showing on headertext
Is your issue resolved? If so, please use the Thread Tools menu to mark the thread Resolved so that we can see that you don't need any further help without opening the thread and reading both posts.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|