Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

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

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
NormanMaina
Asked:
NormanMaina
  • 2
1 Solution
 
CodeCruiserCommented:
Please explain a bit more.
0
 
NormanMainaAuthor Commented:
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
 
CodeCruiserCommented:
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now