本文介绍了在多个组合框中使用DomainDataSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

这更多是关于最佳方式的问题.

我在应用程序中有四个组合框,它们绑定到同一查找表.查找表中有900条记录.三个组合框是我的雇员表中不同字段的查找.四个组合框的最后一个是针对employee表的过滤器.可以用与其他三个组合框不同的方式来过滤最后一个组合框.该列表也可以与其他三个列表相同.

什么?你可能会问.将查找表视为商店列表.因此,一个领域是您购买衣服的地方,一个领域是鞋子和电器的领域.因此,存储列表始终是相同的,但是三个数据字段可以相同或不同.

该应用程序工作正常.目前,对于应用程序中的每个组合框,我都有四个不同的类和四个不同的域数据源.

我敢肯定有比四次加载相同数据更好的方法.有人可以建议克隆或复制数据源的最佳方法吗?我什至需要四个数据源吗?

另一个重要的事实.三个数据组合中只有一个将始终具有数据.大多数情况下,只有当字段中有数据或drop事件时,才能加载其他两个.

Larry Freedman

This is more of a what''s the best way question.

I have four combo boxes in an application that are bound to the same lookup table. There are 900 records in the lookup table. Three of the comboboxes are lookups for different fields in my employee table. The last of the four comboboxes is a filter for the employee table. This last combobox can be filtered in a different way from the other three. The list can also be the same as the other three.

What? You may ask. Think of the look up table as a list of stores. So one field is where you buy your clothes, one field is for your shoes and one for your appliances. So the list of stores is always the same but the three data fields can be the same or different.

The application works fine. Currently I have four different classes and four different domain data sources for each of the combo boxes in the application.

I am sure there is a better way than loading the same data four times. Can someone suggest the optimal way to clone or copy the data sources? Do I even need four data sources?

One other important fact. Only one of the three data combo''s will always have data. Most of the time the other two could be loaded only if there is data in the field or the dropped event.

Larry Freedman

推荐答案



这篇关于在多个组合框中使用DomainDataSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:25