Solved

filter database data using a datagrid control and then export to excel

Posted on 2010-11-19
3
508 Views
Last Modified: 2012-08-13
I want my users to be able to filter database data using a datagrid view and then display results in another datagridview then export the data to excel.

How can i achieve that?
0
Comment
Question by:NormanMaina
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34173751
Please explain a bit more.
0
 
LVL 12

Author Comment

by:NormanMaina
ID: 34178784
I have an sql server 2005 database that I want my users to be able to directly be able to query the data and filter and sort it as per their needs.

I am thinking of using
1) a dataset of the required tables and
2)a windows form with a datagridview control with checkboxes of all teh columns from the tables
3) drop down menus with operator values like '=' ,'=>' 'or' etc ect that will allow users to filter data as they want for the columns
4)another datagridview to display the results
5)be able to export to excel.

The only code sample i may need is for exporting from datagridview to ms access.

The other parts i just want to get advice on best practices and concepts.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34179631
Here is a sample of exporting to excel

http://www.codeproject.com/KB/vb/Senthil_S__Software_Eng_.aspx

You may also be interested in this grid

http://www.codeproject.com/KB/grid/gridextensions.aspx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

937 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now