Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends.

i have a datagridview that in it i show some infoes to the user. now i want to header text be shown in one row not in 2 row. what property i must change? in fact i want to show user header text of every column in one row not two.

thanks in advance
Posted
Comments
BulletVictim 4-Aug-14 1:53am    
Is what environment is this forms, asp.net,etc...
It mostly sounds like a header autosize to content problem.
In forms it would be the AutoSizeColumnsMode property that can be set to AllCells that should help or am I understanding the question incorrectly.
_Starbug_ 4-Aug-14 2:01am    
it is for windows form.
no you think correct sir. i want to header width can increase or decrease with the text of it. when the text of header is long,width of header increace and viseversa.

1 solution

thanks friends. i have solved this myself.

when i set the AutoSizeColumnMode property to DisplayedCells that work for me.

thank you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900