我现在安装的是MS Visual Studio 2005(.NET)。但是看的教程是用2003版的.net。
private void LoadData(object sender, System.EventArgs e) 
        {
            string Afile = "server = 127.0.0.1; database =  NorthWind";
            SqlConnection SconnStr = new SqlConnection(Afile);            if (SconnStr.State.ToString() == "Closed") SconnStr.Open();
            SqlCommand CountCmd = new SqlCommand("select count(*) as co from Employees",SconnStr );
            SqlDataReader Countdr = CountCmd.ExecuteReader();
            if(Countdr .Read ()) 
            {
                PageCount = Int32.Parse(Countdr["co"].ToString()) / PageSize;
                if (Int32.Parse(Countdr["co"].ToString()) % PageSize > 0)
                    PageCount += 1;
                if (PageCount < 1) 
                    PageCount = 1;
            }
            SconnStr.Close();
            lb_PageInfo.Text = "共有" + PageCount + "页\t第" + NowPage + "页";            if (NowPage >= PageCount) NowPage = PageCount;
            if (NowPage <= 1) NowPage = 1;
            int start = (NowPage - 1) * PageSize;
            SqlDataAdapter sda4 =new SqlDataAdapter ("select * from Employees "+AddSql +" order by EmployeeID" ,SconnStr );
            DataSet ds4 = new DataSet();
            sda4.Fill(ds4, start, PageSize, "search");
            dataGrid_1.DataSource = ds4.Tables["search"].DefaultView;
            //dataGrid.
             //dataGrid_1.SetDataBinding(ds4 , "search");
           但是调试时,提示SetDataBinding没有定义。
        }
 但是调试时,提示SetDataBinding没有定义。请问各位高手如何解决。谢谢