Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my sql table there are 2 fields "name" and "Gujarati" ..

Is it possible to change font of data grid view control for only one field please suggest me.

Thank you
Posted
Comments
[no name] 25-Mar-11 0:50am    
are you gujarati?
ok
datagridview->properties->column->select your required column->u can see properties on right side->goto default cell style properties->so u can change ->fore color, back color which you want,
if u not satisfier plz reply.
sima2011 25-Mar-11 1:45am    
hi..Yes i m gujarati..
this is not work...change gujarati field font only not the name field.

Hey sima try it once..

GridView1.Rows[0].Cells[0].BackColor = System.Drawing.Color.Blue;


You can refer any Rows[1] any Cells[2]...

Hope you find it.
 
Share this answer
 
If you have Gujrati fonts installed on your system, then yes you can go ahead and change font for a single field too. Use field property window for the same. (Select the field and do a F4 to get it's property window)
 
Share this answer
 
Comments
sima2011 25-Mar-11 3:24am    
is this possible in vb.net?
Sandeep Mewara 25-Mar-11 3:33am    
Yes!
sima2011 26-Mar-11 9:02am    
then how?in vb.net
add like this you can set any thing by using Item style

<asp:gridview id="grdUsers" runat="server" xmlns:asp="#unknown">
      AutoGenerateColumns="False"  >
    <columns>
        <asp:boundfield datafield="name" headertext="Name" />
            <asp:boundfield datafield="Gujarati" headertext="Gujarati" >
<ItemStyle ForeColor="#0099FF" />
        </asp:BoundField>

    </columns>
 
Share this answer
 
v2

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