如何绑定一个GridView到多种类型的列表? [英] How to bind a GridView to a list of multiple types?
本文介绍了如何绑定一个GridView到多种类型的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到这个错误:
System.Reflection.TargetException:对象不匹配目标类型
System.Reflection.TargetException: Object does not match target type.
试图绑定当列表< IEvent方式>
凡IEvent可以是约会,生日,或相关事件类型的几个其他日历
when trying to bind a List<IEvent>
where an IEvent can be an appointment, a birthday, or a few other calendar related event types.
推荐答案
这不能做,如果你需要这个功能,不使用GridView,是我可以围绕它的唯一途径。
This cannot be done, don't use a gridview if you need this functionality, is the only way I can get around it.
这篇关于如何绑定一个GridView到多种类型的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文