I have a windows form and having datagridview which binds to dataset dynamically , now in the form on the button click event I am changing the datagridview font appearance . I tried below code but its not effecting on Datagridview , only header part is being changing . Please recommended what I done wrong in coding.
datagridview
dataset
button click event
datagridview font
Datagridview
My Code
private void Btn_Language_Click(object sender, EventArgs e)
{
if(DGV_View.Font.Name == "Trebuchet MS")
DGV_View.Font = new System.Drawing.Font("NILKANTH", 12);
this.DGV_View.DefaultCellStyle.Font = new System.Drawing.Font("NILKANTH", 12);
}
else if(DGV_View.Font.Name == "NILKANTH")
DGV_View.Font = new System.Drawing.Font("Trebuchet MS", 11);