我如何右对齐在一个DataGridView列的文字? [英] How can I right-align text in a DataGridView column?

查看:133
本文介绍了我如何右对齐在一个DataGridView列的文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何右对齐在一个DataGridView列的文字?我写一个.NET WinForms应用程序。

解决方案

  this.dataGridView1.Columns [客户名称] DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight。
 

How can I right-align text in a DataGridView column? I am writing a .NET WinForms application.

解决方案

this.dataGridView1.Columns["CustomerName"].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; 

这篇关于我如何右对齐在一个DataGridView列的文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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