开发者

DataGridView ICustomTypeDescriptor

I´m want build a DataGridView with Databinding to a Class where I can add Properties at Runtime. I want to add Columns at runtime and have the values stored in the class. I found a nice example here (Dictionary to store Properties with ICustomTypeDescriptor)

It works fine til i want read information from the DataGridView. I get NullReferenzException or IndexOutOfBoundException.

I think something is missing in my BindingClass with the ICustomTypeDescriptor. The .NET designer don´t create C开发者_开发知识库olumns in Visual Studio but therea are created at programmstart.

I will be realy glad, if someone could help me with this one.


I don't know the answer, but I suggest checking the column management. Maybe you have forgotten for example assigning the Name or DataPropertyName properties of the column...

Please give more description of your problem + some code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜