PC Review


Reply
Thread Tools Rate Thread

DataGridView column sorting glyph not shown

 
 
Toha
Guest
Posts: n/a
 
      7th Mar 2008
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?
 
Reply With Quote
 
 
 
 
Linda Liu[MSFT]
Guest
Posts: n/a
 
      10th Mar 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:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Linda Liu[MSFT]
Guest
Posts: n/a
 
      12th Mar 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:
(E-Mail Removed).

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

 
Reply With Quote
 
Andrus
Guest
Posts: n/a
 
      13th Mar 2008
DisplayedCells makes columns too wide.

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

Andrus.


 
Reply With Quote
 
Toha
Guest
Posts: n/a
 
      13th Mar 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:
> (E-Mail Removed).
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

 
Reply With Quote
 
Linda Liu[MSFT]
Guest
Posts: n/a
 
      18th Mar 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:
(E-Mail Removed).

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting column of base class property in DataGridView raises excep Fritz Microsoft C# .NET 0 18th Mar 2009 10:16 AM
prevent Datagridview column sorting Andrew Microsoft C# .NET 3 14th Feb 2008 03:57 PM
DataGridView - Code Included - Want to Add Column Sorting Tom Microsoft C# .NET 2 5th Feb 2008 12:05 AM
Multi column sorting in DataGridView (WinForms) mahesh.nimbalkar@gmail.com Microsoft Dot NET 0 13th Apr 2007 05:21 PM
How do i change the sort Glyph(image?) in the datagridview? Julia Microsoft C# .NET 0 15th May 2005 02:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 AM.