Hello,

I am using a DatGridView in virtual mode and unbound data where i listen for
CellValueNeeded events to fill the grid with data. I also want to sort the
data by pressing on the columns which is why i listen to
ColumnHeaderMouseClick as well. It works fine, but the problem is that the
sorting glyph (i.e. the sorting order triangle image) is not visible on the
column header if the column size is too small.

I have tried all the AutoFill options available for the column size/width
but none of them seem to be working. The sorting glyph "length" is simply
ignored and
column width is not adapted to include to glyph (i have to manually resize
the column size to see the glyph).

Is there any automatic way of handling this or do i have to calculate the
column width manually by taking into consern the column header text length,
font size and so on?

RE: DataGridView column sorting glyph not shown by v-lliu

v-lliu
Mon Mar 10 02:11:27 CDT 2008

Hi Toha,

> The sorting glyph "length" is simply ignored and column width is not
adapted to include to glyph (i have to manually resize the column size to
see the glyph).

I suggest that you set the AutoSizeColumnsMode property of the DataGridView
to DisplayedCells to see if the problem is solved.

If the problem is still not solved, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


RE: DataGridView column sorting glyph not shown by v-lliu

v-lliu
Wed Mar 12 05:25:14 CDT 2008

Hi Toha,

I'm reviewing this post in the newsgroup and would like to know the status
of this issue.

If the problem is still not solved, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Re: DataGridView column sorting glyph not shown by Andrus

Andrus
Thu Mar 13 06:20:08 CDT 2008

DisplayedCells makes columns too wide.

How to show sort glyph or any other visual sort order indicator for narrow
columns ?

Andrus.



RE: DataGridView column sorting glyph not shown by toha

toha
Thu Mar 13 06:36:03 CDT 2008

Hi Linda,

I did post you an answer but now i see that it is not there, strange!

Anyway, the AutoSizeColumnMode did not help when i changed to
DisplayedCells, but what i noticed is that if you put the minimum width of
the column header to be the size/width of the text+1, then the glyph is
shown. That is the way i am using it now, it seems to be working...

Best regards,
Toha.


"Linda Liu[MSFT]" wrote:

> Hi Toha,
>
> I'm reviewing this post in the newsgroup and would like to know the status
> of this issue.
>
> If the problem is still not solved, please feel free to let me know.
>
> Thank you for using our MSDN Managed Newsgroup Support Service!
>
> Sincerely,
> Linda Liu
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

RE: DataGridView column sorting glyph not shown by v-lliu

v-lliu
Mon Mar 17 21:19:59 CDT 2008

Hi Toha,

Thank you for your feedback on how you solved the problem successfully! I'm
glad to hear that the problem is solved now.

Setting AutoSizeColumnMode property to DisplayedCells may not working well
in your real project, but it does work well in my test project.

If you have any other questions in the future, please don't hesitate to
contact us. It's always our pleasure to be of assistance!

Have a good day!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.