具有Excel-like AutoFilter连接问题的高级DataGridView访问数据库 [英] Advanced DataGridView with Excel-Like AutoFilter Connection Problem to Access Database

查看:99
本文介绍了具有Excel-like AutoFilter连接问题的高级DataGridView访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想咨询一下我在互联网上找不到的东西。几天前,我开始使用"Advanced DataGridView with Excel-like
Auto Filter"。在我的项目中。

我是通过Visual Studio 2017中的Manage NuGet Packages部分下载的。该算法由ADGV开发( https://adgv.codeplex.com/)< span style ="color:#253340 ; font-family:'Segoe UI',Tahoma,Arial,Helvetica,sans-serif; font-size:13.3333px">

它在过滤和排序来自非加密访问数据库的数据方面非常有用。 



但是,今天我决定加密同一个数据库,然后当我开始在Microsoft Visual Studio 2017中运行我的代码时,它给出了如下错误; 



System.Data.OleDb.OleDbException:'密码无效。'



我必须将mypassword放在以下代码中,但我无法管理它因为我不知道如何在其中放置一个定义代码的密码。





// TODO:这行代码将数据加载到'dENEMEDataSet.Tablo1'​​表中

this.tablo1TableAdapter.Fill(this.dENEMEDataSet.Tablo1);





有人可以帮我解决这个问题吗?



注意:dENEME是我的访问数据库文件的名称,tablo1是该访问文件中我的表的名称

I downloaded it via Manage NuGet Packages section in Visual Studio 2017. The algorithm was developed by ADGV (https://adgv.codeplex.com/)
It works absolutely great in terms of filtering and sorting the data which is coming from a non-encrypted access database. 

However, today I decided to encrypt the same database and then when I started to run my code in Microsoft Visual Studio 2017, it gave an error as follows; 

System.Data.OleDb.OleDbException: 'Invalid Password.'

I must put mypassword inside the following code, but I could not manage it beacuse I don't know how to place a password defining code inside it.


// TODO: This line of code loads data into the 'dENEMEDataSet.Tablo1' table
this.tablo1TableAdapter.Fill(this.dENEMEDataSet.Tablo1);


Can someone please help me on that issue??

Note: dENEME is the name of my access database file and tablo1 is the name of my table in that access file

推荐答案

您好AYKUT,

Hi AYKUT,

对于您的问题,我建议您询问算法的作者
here

For your question, I suggest you ask the author of the algorithm here.

事实上,DataGridView列已经支持排序。

In fact, the DataGridView columns already support sorting.

我将使用您的数据填充DataTable,然后将DataGridView绑定到myDataTable.DefaultView。

I would populate a DataTable with your data and then bind the DataGridView to myDataTable.DefaultView.

您可以通过设置myDataTable.DefaultView.RowFilter来过滤显示的行。

You can filter the rows displayed by setting myDataTable.DefaultView.RowFilter.

您可以将文本框和/或组合框放在DataGridView上方,并在输入/选择更改时更新myDataTable.DefaultView.RowFilter。

You could place Textboxes and/or Comboboxes above the DataGridView and update myDataTable.DefaultView.RowFilter as the input/selections change.

参考:
C#Winforms DataGri dView,像Excel一样进行排序/过滤。

MSDN中还有一个文档:
构建DataGridView列标题单元格的下拉列表。

Also there is a document in MSDN: Building a Drop-Down Filter List for a DataGridView Column Header Cell.

注意:此响应包含对第三方万维网站点的引用。 Microsoft提供此信息是为了方便您。 Microsoft不控制这些网站,也未测试在这些网站上找到的任何软件或信息;因此,
Microsoft不能就其中发现的任何软件或信息的质量,安全性或适用性做出任何陈述。使用互联网上的任何软件都存在固有的危险,微软提醒您在从互联网上检索任何软件之前确保您完全了解风险。

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

最诚挚的问候,

Stanly


这篇关于具有Excel-like AutoFilter连接问题的高级DataGridView访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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