如何将对象数组列表绑定到Telerik Rad List Box? [英] How to bind list of array of Objects to Telerik Rad List Box?

查看:77
本文介绍了如何将对象数组列表绑定到Telerik Rad List Box?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Guys,

I have a list of array of objects. I want to bind the list to an Telerik Rad List Box. I want to bind few fields of object as Text Field and few fields of object as Value Fields.

推荐答案

我建​​议声明一个接口具有您想要绑定的属性,并使集合成为 List< ITheInterface> 。现在,在集合中实现所需的所有类 ITheInterface ,你会发现绑定要简单得多。更不用说你现在是类型安全的,因为你不能在集合中添加会破坏绑定的东西。
I recommend declaring an interface that has the properties that you want bound, and making the collection a List<ITheInterface>. Now, make all of the classes that you want in the collection implement ITheInterface and you'll find that the binding is much simpler. Not to mention you're now type safe because you can't add something to the collection that would break the binding.


这篇关于如何将对象数组列表绑定到Telerik Rad List Box?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆