?
Solved

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

Posted on 2010-11-19
3
Medium Priority
?
520 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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