如何在运行时拉伸datasgridview图像列 [英] How to stretch a datasgridview image column at runtime
本文介绍了如何在运行时拉伸datasgridview图像列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友
我正在设计一个带有datagrid的表单,其中在运行时填充了datagridview,现在的问题是在运行时也扩展了image列.有人可以帮忙吗
谢谢
Hi friend
i am designing a form with datagrid in which am filling the datagridview at runtime, now the problem is stretching the image column at runtime also. Can someone help with this
thanks
推荐答案
如果要在运行时设置列的宽度,则只需要使用 ^ ].
使用 GridView.OnRowCreated方法 [ ^ ]跟踪所需的宽度,然后在处理完所有行后为该列设置最终宽度.
If you want to set the width of a column at runtime, then you just need to use the DataGridViewColumn.Width Property[^].
Use the GridView.OnRowCreated Method[^] to track what you want the width to be and then set a final width to the column once all the rows have been processed.
这篇关于如何在运行时拉伸datasgridview图像列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文