//////////////开始以前,先认识一下WinForm控件数据绑定的两种形式,简单数据绑定和复杂数据绑定。 //////////////1)
简单数据绑定 //////////////////using
(SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["connStr"].ToString())) //////////////////{ ////////////////// SqlDataAdapter sda
= new SqlDataAdapter("Select * From T_Class Where F_Type='Product'
order by F_RootID,F_Orders", conn); ////////////////// DataSet Ds = new
DataSet(); ////////////////// sda.Fill(Ds,
"T_Class");
using System; using
System.Collections.Generic; using
System.ComponentModel; using System.Data; using
System.Drawing; using System.Text; using
System.Windows.Forms; using
System.Collections;
namespace
DataGridViewBindingData { public partial class Form1 :
Form { public Form1() { InitializeComponent(); }