Advertisement

01.11.2004 at 02:37PM PST, ID: 20847733
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Help with the VB.net datagrid
Zone: .NET
Tags: datagrid
Hi,

I have an access database with 5 columns Name, Date, Money, Owing, Total.

when I start the form all the data in the database appears.  I want to make it so that if I press a button the name and date show in the datagrid, and another button shows name and money, and the third button is name date owing and total.  Is there anyway to do this?  Maybe changing the data adapter or something, also I would like to have one more button that shows any name with money over 200 can anyone help with this??

Thanks
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: balonyJoes90210
Solution Provided By: Dabas
Participating Experts: 8
Solution Grade: A
Views: 478
Translate:
Loading Advertisement...
01.11.2004 at 02:39PM PST, ID: 10092613

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.11.2004 at 02:53PM PST, ID: 10092664

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.11.2004 at 03:20PM PST, ID: 10092760

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2004 at 12:02AM PST, ID: 10093924

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2004 at 01:58AM PST, ID: 10094297

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2004 at 06:39AM PST, ID: 10095261

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.12.2004 at 10:21AM PST, ID: 10096717

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.22.2004 at 06:18AM PST, ID: 10173921

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.07.2004 at 05:02AM PDT, ID: 10773843

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.16.2004 at 10:30AM PDT, ID: 10844422

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.16.2004 at 12:21PM PDT, ID: 10845304

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.18.2004 at 10:05PM PDT, ID: 10856691

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
01.11.2004 at 02:39PM PST, ID: 10092613

Rank: Master

Hi balonyJoes90210,
The answer to most of your questions is to use a DataView and to bind the datagrid to the dataview, after restricting your data to what you want.

Dabas
 
01.11.2004 at 02:53PM PST, ID: 10092664
Yes. DataGrid has Columns property that is collection of DataGridColumn-s. You can hide any of them using DataGridColumn's Visible property.

DataGrid1.Columns(1).Visible = False ' will hide second column

 
01.11.2004 at 03:20PM PST, ID: 10092760

Rank: Guru

 
01.12.2004 at 12:02AM PST, ID: 10093924
Sorry, I guess the real question I was trying to ask was basically how to change the sql code in runtime to change the datagrid, where do I go?  Is there a property in the data adapter so that I can change the sql code?  I do understand how to populate the data grid, I just don't know how to change the data in it.  I built a bunch of queries in my access database, can I use those different ones in run time to change the data in the datagrid?  any more help would be great.
 
01.12.2004 at 01:58AM PST, ID: 10094297

Rank: Sage

every time the button is clicked you can bind your datagrid with the data from the db
you can make a filter of your datatable so you can change the shown records
but if you want to show different information just assign the select command propery of the data adapter to a new sql statement

HTH
B..G
 
01.12.2004 at 06:39AM PST, ID: 10095261

Rank: Genius

If I understand your question correctly, the data adapter has 4 property sections in the properties window:  DeleteCommand, InsertCommand, SelectCommand, and UpdateCommand.  You can expand the SelectCommand section, and change the CommandText property to reflect the new SQL code.  Also, you can press the ellipsis button (...) to use Query Builder form.
Assisted Solution
 
01.12.2004 at 10:21AM PST, ID: 10096717

Rank: Master

balonyJoes90210:
You can change the datasource in code. That is why I suggested the DataView.
If the underlying table stays the same, then change the RowFilter property of the DataView.
If it does not, then create a new DataSet.

In either case, all you need to do is two lines in code

DataGrid1.Datasource = (The dataset or dataview)
DataGrid1.Refresh

Dabas
Accepted Solution
 
01.22.2004 at 06:18AM PST, ID: 10173921
I have a datagrid which displays a single datatable via a dataview (I used the dataview because I did not want the user to add new rows).  My problem is that if the value in column 1 changes, I need to set the value in column 2 to 'false'.   What event fires if/when the value in a datagrid cell changes?

Thanks
 
04.07.2004 at 05:02AM PDT, ID: 10773843
Step1.
Write code to handle the ColumnChanging event for the appropriate table
 For Eg:

Private Sub Customers_ColumnChanging(ByVal sender As Object, _
ByVal e As System.Data.DataColumnChangeEventArgs)
   
   If (e.Column.ColumnName.Equals("Column1")) Then
''Set the particular cell value to false
     Datagrid1.Item(CurrentRowIndex,1)="False"
     End If
End Sub
step2:
''Connect the event handler to the event
''Place the following code within either the form's Load event or its constructor.

AddHandler customersDataSet1.Tables("Customers").ColumnChanging,
Addressof Customers_ColumnChanging



 
04.16.2004 at 10:30AM PDT, ID: 10844422
In vb.net i want to be able to break my listbox into columns, so if i where to populate my listbox with names i could have the firstname in column 1 and surname in column 2.
I am using a Access database and adding my items like so

listBox1.items.add(myRecordSet("surname").value)

this works but i want to be able to add forename as well in a second column.
 
04.16.2004 at 12:21PM PDT, ID: 10845304

Rank: Master

James:

You have to ask your own question!!!

Dabas
 
04.18.2004 at 10:05PM PDT, ID: 10856691
Hi James.
Instead of using listbox my suggetion is to use listview control of the .NET .It allows to add multiple columns..
 Stetps:
    Instead of using listbox my suggetion is to use listview control of the .NET .It allows to add multiple columns..
 Stetps:
 1. Add a listview control
2. It is having a View property.Change tht property to "Detail"

3.add columns
  eg:
 Public Sub AddColumns()
        ' Adding ListView Columns
        lstViewResource.Columns.Add("FirstName", 70, HorizontalAlignment.Left)
        lstViewResource.Columns.Add("Surname", 100, HorizontalAlignment.Left)
4.Add Items
eg:
Dim str(2) As String
Dim itm As ListViewItem
for i=0 to dataset.Tables("Address").rows.count -1
str(0) = dataset.Tables("Address").Rows(rowindex)(colindex)''firstName
 str(1) =dataset.Tables("Address").Rows(rowindex)(colindex)'Surname

itm = New ListViewItem(str)
lstViewResource.Items.Add(itm)
next

Hope this will help u..

 

     
 
 
20080236-EE-VQP-29