首页 > 其他 > 详细

BindingSource组件使用??

时间:2021-05-23 09:23:43      阅读:10      评论:0      收藏:0      [点我收藏+]

第一个例子:

 界面设计:一个DataGridView、BindingNavigater;将DataGridView的DataSource属性设置为选择数据源,这里选择了NorthWind数据库。选择完成后会生成一个DataSet、BindingSource和TableAdapter。将bindingNavigater1的BindingSource属性设置为bindingsource;

打开窗体的代码视图会发现已经自动生成了如下代码:

private void Form2_Load(object sender, EventArgs e)        
{

// TODO: 这行代码将数据加载到表“database1DataSet.Stra”中。您可以根据需要移动或移除它。
this.straTableAdapter.Fill(this.database1DataSet.Stra);
}

 

BindingSource组件使用??

原文:https://www.cnblogs.com/wfy680/p/14800386.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!