using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; namespace AppliedDataBindingSample { public partial class MasterDetailsForm : Form { public MasterDetailsForm() { InitializeComponent(); //this.homePageLinkLabel.DataBindings["Text"].Format += homePageLinkLabel_Format; } //void homePageLinkLabel_Format(object sender, ConvertEventArgs e) { // // Bail if data source's property is null // if( e.Value == DBNull.Value ) return; // // Extract the URL // Match match = Regex.Match(e.Value.ToString(), @"(?i)(?<=[^#]*#)[^#]*(?=#)"); // if( match != null ) e.Value = match.Value; //} private void MasterDetailsForm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'northwindDataSet.Products' table. You can move, or remove it, as needed. this.productsTableAdapter.Fill(this.northwindDataSet.Products); // TODO: This line of code loads data into the 'northwindDataSet.Suppliers' table. You can move, or remove it, as needed. this.suppliersTableAdapter.Fill(this.northwindDataSet.Suppliers); } //private void homePageLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { // SupplierBrowserForm browser = new SupplierBrowserForm(homePageLinkLabel.Text); // browser.ShowDialog(); //} } }