创建自定义列类型? [英] creating a custom column type?
问题描述
当我尝试在设计时将列添加到数据网格中时,
有针对该列的自定义类型,我必须选择其中一种类型的
作为示例 dataGridViewTextBoxColumn。 >
如何创建自定义列类型?
我想要的是我的列的自定义类型,称为 dataGridViewNumberTextBoxColumn
,可以在设计时为我的datagrid选择它
when I try to add a column to my datagrid at design time
there are custom types for the column and i must choose one of these types
as an example "dataGridViewTextBoxColumn"
how can I create a custom column type ?
what I want is a custom Type for my column called "dataGridViewNumberTextBoxColumn"
that i can choose it for my datagrid at design time
我正在使用c#和.Net和Windows窗体应用程序
谢谢
I am using c# and .Net and a windows form application
thanks
推荐答案
基本上,您需要从基类 DataGridViewColumn
继承并创建自己的可视显示。
Basically, you need to descend from the base class DataGridViewColumn
and create your own visual display.
请参见此处的操作示例:
See here for an example of how to do this:
- Create a Custom DataGridView Column
这篇关于创建自定义列类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!