Windows窗体中的datagrid编辑按钮不在Visual Studio 2003中的WEB窗体中 [英] datagrid edit buttons in Windows form NOT IN WEB FORM in Visual Studio 2003

查看:86
本文介绍了Windows窗体中的datagrid编辑按钮不在Visual Studio 2003中的WEB窗体中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2003并访问数据库.

我有一个窗口表单(不是Web表单).我在窗体上有一个DataGrid控件.使用数据适配器和数据集,我已将表绑定到datagrid并将数据从Access数据库加载到datagrid
现在,我想编辑一个或多个单元格中的数据,然后将更改更新回同一数据库.

最近三天,我在网络上进行了大量的搜索和阅读.似乎每个人都在谈论关于Web表单数据网格控件"而不是窗口表单.
请注意,2003版本没有数据网格视图控件.它于2005年首次引入

谁能告诉我该怎么做.请注意他们我今年65岁,脑力不佳,没有编程天赋.我刚刚开始使用Visual Basic 2003学习编程
请不要提供线索和提示,请保持描述性.

I am using Visual Studio 2003 and access database.

I have a window form (NOT A WEB FORM). I have a DataGrid Control on the form. Using data adapter and data set I have bound the table to datagrid and have loaded the data from Access Database in the datagrid
Now I want to edit the data in one or more cell and then update the changes back the same database.

I have done tremendous amount of search and reading on web in last 3 days. Seems like every one talking about is "about web form datagrid control" not for window form.
Please note that 2003 version do not have datagrid view control. It was first introduced in 2005

Can any one tell me how to do it. Please note them I am 65 year old with with dimished cerebral faculty and no Programing talent. I, just have started leaning programing using Visual Basic 2003
Please do not give clues and hints, be descriptive.

推荐答案

很抱歉让您失望,但无法描述性-我什至没有确保我能给您很多线索或提示.

这样做的原因是我没有VS2003的副本,所以我无法测试我在这里说的任何内容,或者指向您指出:我的PC上甚至都没有VS2005!它太旧了,比当时落后了四个版本和八年,而且很少有人再使用它-他们可能都在进行维护,而不是新项目.
话虽如此,它应该很简单:要更新数据库时,只需在DataAdapter上调用Update方法即可.

MSDN [ ^ ]讨论了Winforms下的DataGrid和DataAdapter-适用于Windows Mobile,其中仍然包括DataGrid,当然包括Mobile 6,甚至可能包含Mobile7.由于Windows Mobile运行的是真实" .NET的NETCE.消除了很多麻烦,只要对WM5起作用的任何东西,只需稍作调整即可在VS2003中使用Winforms.

话虽如此,我强烈建议您升级-至少要升级到VS2008. Microsoft确实将这些工具作为Express版本发布,它们是免费的并且非常完整-当然,对于初学者来说,您不会发现很多遗漏.在这里看看: http://www.microsoft.com/visualstudio/zh-CN /products/2008-editions/express [ ^ ]或此处 [ ^ ] for 2010版本.
Sorry to disappoint you, but it isn''t possible to be descriptive - I''m not even sure if I can give you many clues or hints.

The reason for that is that I do not have a copy of VS2003 so I can''t test anything I say here, or point you to: I don''t even have VS2005 on my PC any more! It''s just too old, four versions and eight years behind the times, and very, very few people are using it any more - and they are probably all doing maintenance, rather than new projects.
Having said that, it should be simple: just call the Update method on your DataAdapter when you want to update the database.

There is a thread on MSDN[^] which discusses DataGrid and DataAdapter under Winforms - it''s for Windows Mobile which still included DataGrid, certainly up to Mobile 6, and possibly in Mobile 7. Since Windows Mobile runs NETCE which is "real" .NET with a lot of the bells and whistles removed anything which works for WM5 should only need minor tweaks to work with Winforms in VS2003.

Having said that, I would strongly suggest that you upgrade - at least as far as VS2008. Microsoft does release these tools as Express versions, which are free and pretty much complete - certainly for a beginner, you won''t notice much missing. Have a look here: http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express[^] or here[^] for the 2010 versions.


这篇关于Windows窗体中的datagrid编辑按钮不在Visual Studio 2003中的WEB窗体中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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