使用绑定导航器保存 [英] Saving using binding navigator

查看:95
本文介绍了使用绑定导航器保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里错过了什么吗?我想当您带上并按下预制的绑定导航器上的保存"按钮时,它将更新您的所有记录.

这是奇怪的事情.当我在开发人员中运行该程序并进行更改并单击保存"时,它似乎已保存.我关闭程序,然后再次将其加载到开发人员中,并且数据在那里.然而;当我在数据库中查找要写入的数据时,数据更新不存在.我是否可以为click事件添加一些默认值以外的内容:

Am I missing something here? I thought when you take and hit the save button on the premade bindingnavigator it will update all your records.

Here is what is strange. when i run the program in the developer and make a change and hit save it appears to save it. I close the program and load it again in the developer and the data is there. However; when I look in my database that the data is suppose to be written to, the data update does not exist. Am I suppose to add something to the click event other than the default of:

private void bookListBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            this.Validate();
            this.bookListBindingSource.EndEdit();
            this.tableAdapterManager.UpdateAll(this.bookdbDataSet);

        }

推荐答案

希望您已经解决了问题.

如果不是,我建议您检查绑定源,是否将数据集对象bookdbDataSet指向其数据源,而不是将其指向数据集的类.您可以在绑定源属性中找到它.

可能还有其他原因.但是,在不了解您的项目的情况下很难假设.
I hope you have solved your problem already.

In case you are not, I will suggest you to check your binding source whether its pointing the dataset object bookdbDataSet as its data source rather than the class of the Dataset. You can find it in your binding source property.

There may have other reasons.But its hard to assume without knowing a little bit more about your project.


这篇关于使用绑定导航器保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆