Windows Develop Bookmark and Share   
 index > Windows Forms General > DataGridView Header set row fix
 

DataGridView Header set row fix

Hi

I have a datagridview.

The user can't resize rows and columns and can't also add a row.

So all cells are fix.

But the header height can be edited.
If the mouse is over the lower border of the header column
the mouse cursor changed and the user can change the height of the header.

Hope is was good explained. How can I stop this.

I think it's easy but I don't find it.

Any help would be great. Thanks in advance.
Codeschubser  Thursday, September 17, 2009 10:49 AM

Ok here is the solution:

ColumnHeadersHeightSizeMode =

DataGridViewColumnHeadersHeightSizeMode.DisableResizing;

  • Marked As Answer byCodeschubser Saturday, September 19, 2009 2:01 PM
  •  
Codeschubser  Saturday, September 19, 2009 1:53 PM

Set:

AllowUserToAddRows = true;

AllowUserToResizeColumns = true;

AllowUserToResizeRows = true;

ColumnHeadersHeightSizeMode = AutoSize;


Please mark the post as answer if it is helpfull to you because it boosts the members to answer more and more.
  • Proposed As Answer by_SuDhiR_ Thursday, September 17, 2009 12:08 PM
  •  
_SuDhiR_  Thursday, September 17, 2009 11:14 AM

Ok here is the solution:

ColumnHeadersHeightSizeMode =

DataGridViewColumnHeadersHeightSizeMode.DisableResizing;

  • Marked As Answer byCodeschubser Saturday, September 19, 2009 2:01 PM
  •  
Codeschubser  Saturday, September 19, 2009 1:53 PM

You can use google to search for other answers

Custom Search

More Threads

• using multiple timers at a time.??
• How do I simultaneously display a container and its child controls?
• GDI+ Bug??? Out of Memory Exception and Generic Error
• How to remove CR/LF from a text box
• Application Icons
• Edit value in DataGrid
• buttonTab
• sliding panel like VS2005
• Resizing of controls in tablelayout panel
• Wishes