Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How can i bold the datagrid header by using C#. can anyone have any idea about this.

Regards,
Basha.
Posted

Try this.
datagrid.HeaderStyle.Font.Bold = true;
 
Share this answer
 
And if you want to do at runtime based on some condition then you need to implement the rowdatabound event which is called for every row. Check whether the row is header and if it is, then based on your condition, make it bold.
 
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