Datagridview列限制 [英] Datagridview column limit
本文介绍了Datagridview列限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个datagridview表,我需要在其中显示一些数据。在某些情况下,我超过了列数限制并得到以下错误:
I have a datagridview table that I need to display some data in. In certain instances, I exceed the column number limit and get the following error:
列的FillWeight值的总和不能超过65535
Sum of the columns' FillWeight values cannot exceed 65535
还有其他工具可以用来克服此问题吗?
Is there any other tool that I could use to overcome this constraint?
推荐答案
打开网格事件 columnAdded
。
private void dataGridViewName_ColumnAdded(object sender, DataGridViewColumnEventArgs e)
{
e.Column.FillWeight = 10; // <<this line will help you
}
这篇关于Datagridview列限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文