Smart Data container

Source: Internet
Author: User

Before using a Smart Data container, let's see how controls synchronize data between them. When the volume is set, the window itself will create some synchronized object management tasks, because multiple controls on the window may be bound to the same data source, and we want them to stay synchronized. The window itself has a bindingcontext atomicity, which saves a set of synchronized objects used as the data source for the customized window. A container component (such as form or bindingsource) creates a ready-to-use volume manager for all list-based data sources specified by the Window widget, then, it will be added to the fixed upstream and downstream questions of the window. This browser manager will not be able to access the base data source specified by the browser control, it also depends on the control on the data volume. We can use the manager of the current console to check the base data volume on the control, and modify the forward data volume, in this way, all the controls above are also reflected. When the data volume in the specified set is added, deleted, or modified, the browser will notify the preset control, the control can use these notifications to refresh the metric data source display. Intelligent Data Processing container example: using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. text; using system. windows. forms; using northwinddataaccess; namespace detail {public partial class form1: FORM {public form1 () {initializecomponent ();} private void onformload (Object sender, eventargs e) {customersdataset nwdata = customersdatas ET. getcustomers (); m_customersgrid.datasource = m_customersbindingsource; m_customersbindingsource.datasource = nwdata. customers; addtextboxdatabindings (); values ();} private void addtextboxdatabindings () {values ("text", m_customersbindingsource, "customerid"); values ("text", m_customersbindingsource, "companyName"); m _ Contactnametextbox. databindings. add ("text", m_customersbindingsource, "contactname"); encrypt ("text", m_customersbindingsource, "phone");} private void Merge () {m_contactscombo.datasource = m_customersbindingsource; m_contactscombo.displaymember = "contactname"; m_contactscombo.valuemember = "customerid" ;}} the source bindingsource can be used as a proxy before the control and the related data source. It provides all the functions required to adjust the context of a widget on a monitoring or management window. We set the control of the window to the custom source, and then set the custom source to the data source. If you need to modify the data source defined by the control, you only need to modify the datasource and datamember adequacy of the source. All the controls above are automatically updated. If you need to know the current period in the data source, you can also directly obtain it through the specified period. If you want the compile process to modify the current feature, the source setting shows the methods and features for implementing this feature. If you need to get the notification of data modification in the data source, the source region shows events that can be renewed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.