Solved

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

Posted on 2010-11-19
3
502 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

19 Experts available now in Live!

Get 1:1 Help Now