在数据网格视图中更改一个字段的字体 [英] change font in data grid view for one field

查看:97
本文介绍了在数据网格视图中更改一个字段的字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的sql表中,有2个字段"name"和"Gujarati" ..

是否可以仅更改一个字段的数据网格视图控件的字体,请建议我.

谢谢

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

推荐答案

嘿sima尝试一次..

Hey sima try it once..

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



您可以引用任何行[1]任何单元格[2] ...

希望您能找到它.



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

Hope you find it.


如果您的系统上安装了Gujrati字体,那么可以继续更改单个字段的字体.使用字段属性窗口也是如此. (选择该字段并执行F4键以获取其属性窗口)
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)


添加这样,您可以使用项目样式设置任何内容

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>


这篇关于在数据网格视图中更改一个字段的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆