Solved

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

860 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