Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2008

Tip: Looking for answers? Try searching our database.

DataGridView column sorting glyph not shown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Toha - 07 Mar 2008 09:26 GMT
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?
Linda Liu[MSFT] - 10 Mar 2008 08:11 GMT
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.
Linda Liu[MSFT] - 12 Mar 2008 11:25 GMT
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.
Andrus - 13 Mar 2008 12:20 GMT
DisplayedCells makes columns too wide.

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

Andrus.
Toha - 13 Mar 2008 12:36 GMT
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.

> Hi Toha,
>
[quoted text clipped - 16 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Linda Liu[MSFT] - 18 Mar 2008 03:19 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.