Share via


how to make cell in datagridview bold and underlined.

Question

Thursday, September 3, 2009 5:19 AM

this is how i bold the perticular cell of a column in datagridview

dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[5].Style.Font= new Font("Ariel", 8, FontStyle.Bold );

 

 

but i want to Underline on this perticular cell
How can i do it.

i.e I want this cell should be  bold and underlined.

All replies (3)

Thursday, September 3, 2009 5:31 AM âś…Answered

dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[5].Style.Font = 
                new Font("Ariel", 8, FontStyle.Bold | FontStyle.Underline);

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!


Thursday, September 3, 2009 5:44 AM

Thanks for the help.


Thursday, September 3, 2009 7:11 AM

I am using mouse click event to bold the columns and get the totals..

i.e right click to get totals
and center click to make bold..

Now i want to make underline a pericular cell.

i want a event..other than mouse click.. which can be used..