数据绑定到对象... [英] Data Binding to a object...

查看:49
本文介绍了数据绑定到对象...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定我是否会沿着正确的路线走下去...


我有一个暴露了一个物体属性的类(在此

案例对象代表客户)。然后我可以将这个对象用于文本框等的
数据绑定吗?


我不能使用数据集,因为对象有大量的派生逻辑,例如

更新一个属性实际上可以更新几个数据库字段

例子。


希望我已经解释清楚了足够...


问候

Simon

I''m not sure if I''m going down the correct route...

I have a class which exposes a number of properties of an object (in this
case the object represents a customer). Can I then use this object to
databind to text boxes etc?

I can''t use a dataset as the object has loads of derived logic, for example
updating one property may actually update several database fields for
example.

Hope I''ve explained this clear enough...

Regards
Simon

推荐答案

只要你的对象实现IList,ICollection,IEnumerable然后你

应该没问题


-


OHM(特里烧伤)

。 。 。单手人。 。

" Simon Verona" <是ne ** @ aphroditeuk.com>在消息中写道

新闻:e3 ************** @ TK2MSFTNGP09.phx.gbl ...
As long as your object implements IList, ICollection, IEnumerable then you
should be OK

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Simon Verona" <ne**@aphroditeuk.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
我不是确定我是否走正确的路线......

我有一个暴露了一个对象属性的类(在这种情况下,对象代表一个客户)。然后我可以使用这个对象来数据绑定到文本框等吗?

我不能使用数据集,因为对象有大量的派生逻辑,对于
示例更新一个属性实际上可能会更新几个数据库字段

希望我已经解释清楚了这一点......

问候
Simon
I''m not sure if I''m going down the correct route...

I have a class which exposes a number of properties of an object (in this
case the object represents a customer). Can I then use this object to
databind to text boxes etc?

I can''t use a dataset as the object has loads of derived logic, for example updating one property may actually update several database fields for
example.

Hope I''ve explained this clear enough...

Regards
Simon



OHM


我不认为你有任何实际代码的引用例子/

演练?我正在通过谷歌搜索,但像往常一样......重要的不是

答案,这是正确的问题 - 这显然暗指

me!


非常感谢你的帮助。


Simon

" One Handed Man(OHM - 特里伯恩斯) < news.microsoft.com>在消息中写道

news:eU ************* @ TK2MSFTNGP11.phx.gbl ...
OHM

I don''t suppose you''ve got any references to actual code examples /
walkthroughs? I''m searching through google, but as usual... it''s not the
answer that matters, it''s the correct question - which is obviously alluding
me!

Many thanks for your help.

Simon
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:eU*************@TK2MSFTNGP11.phx.gbl...
只要您的对象实现IList,ICollection,IEnumerable那么你应该没关系

-

OHM(特里伯恩斯)
。 。 。单手人。 。

" Simon Verona" <是ne ** @ aphroditeuk.com>在消息中写道
新闻:e3 ************** @ TK2MSFTNGP09.phx.gbl ...
As long as your object implements IList, ICollection, IEnumerable then you
should be OK

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Simon Verona" <ne**@aphroditeuk.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
我不确定我是不是'我走了正确的路线...

我有一个暴露了一个对象属性的类(在
中,这个对象代表一个客户)。然后我可以使用这个对象
来数据绑定到文本框等吗?

我不能使用数据集,因为对象有很多派生逻辑,对于
I''m not sure if I''m going down the correct route...

I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this object to databind to text boxes etc?

I can''t use a dataset as the object has loads of derived logic, for


示例

更新一个属性实际上可能会为
示例更新几个数据库字段。

希望我已经解释清楚了......

问候
Simon
updating one property may actually update several database fields for
example.

Hope I''ve explained this clear enough...

Regards
Simon






不要忘记实现IEditableObject如果你想能够
更改绑定数据。


Ken

---------------------


One Handed Man(OHM - Terry Burns)" < news.microsoft.com>写在

消息新闻:eU ************* @ TK2MSFTNGP11.phx.gbl:
Hi,

Don?t forget Implements IEditableObject if you want to be able to
change the bound data.

Ken
---------------------

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
message news:eU*************@TK2MSFTNGP11.phx.gbl:
只要您的对象实现了IList, ICollection,IEnumerable然后你

应该没问题
As long as your object implements IList, ICollection, IEnumerable then you

should be OK




-

外发邮件已通过无病毒验证。

由AVG Anti-Virus检查( http://www.grisoft.com )

版本:7.0.230 /病毒库:263.3.3 - 发布日期:2004年6月18日



--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.3 - Release Date: 6/18/2004


这篇关于数据绑定到对象...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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