只有一个列的datagridview字体更改 [英] datagridview font change of only one colomn

查看:71
本文介绍了只有一个列的datagridview字体更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发一个桌面应用程序,并且正在使用datagridview来显示数据库中的数据.

我有一个数据库,其中有3列table1

名称数量托盘_计算

我想更改仅datagridview的第一列的字体,其中名称显示在印地语中,其他列的字体应为arial.

有可能吗?

我可以根据列更改datagridview的字体吗?

我还使用了datagridview1.defaultcellstyle.font = new font("Kruti Dev 010",10),但它更改了datagridview中所有单元格的字体.

任何人都可以帮我吗.

在此先感谢

Hi,

I''m developing a desktop application and am using a datagridview to show the data from the database.

I have a database in which I have 3 columns of table1

name qty tray_Calculation

I want change the font of only datagridview''s 1st column in which name is shown in hindi, other column''s font should be arial.

Is It Possible?

Can I change the font of datagridview according to column?

I also used datagridview1.defaultcellstyle.font=new font("Kruti Dev 010",10) but it changes the font of all cells in datagridview.

Can any one help me Please.

Thanks in advance

推荐答案

是的.检查这里:

^ ]
Yes it is possible. Check here:

http://www.ucancode.net/faq/Visual_C_MFC_Zooming_Scrolling.htm[^][^]


尝试一下,
Try this,
DataGridView1.Columns(0).DefaultCellStyle.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))


这篇关于只有一个列的datagridview字体更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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