Advertisement

03.02.2008 at 06:24PM PST, ID: 23208323
[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!

insert data into datagridview in visual basic 2005

I am developing with visual basic 2005 and access 2007 as backend.
I have a datagridview, a button for date, and a textbox to enter a numeric value.  What I would like to know if is it possible that when i press on this "button" a today's date is shown within the datagrid automatically and when I enter a numeric value into this one "textbox", this value is automatically displayed within the same datagrid next to the date that was just created?  and how do I save these changes to access 2007 via visual basic interface.
Please let me know if I have some options and where can I find help?
Thank you
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: systems_ax
Solution Provided By: jpaulino
Participating Experts: 3
Solution Grade: A
Views: 150
Translate:
Loading Advertisement...
03.02.2008 at 08:52PM PST, ID: 21029070

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.

 
03.02.2008 at 09:10PM PST, ID: 21029113

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.

 
03.02.2008 at 09:38PM PST, ID: 21029200

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.

 
03.02.2008 at 10:04PM PST, ID: 21029289

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.

 
03.03.2008 at 05:36PM PST, ID: 21037548

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.

 
03.03.2008 at 05:55PM PST, ID: 21037617

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.

 
03.03.2008 at 05:58PM PST, ID: 21037637

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.

 
03.03.2008 at 06:12PM PST, ID: 21037678

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.

 
03.03.2008 at 06:28PM PST, ID: 21037734

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.

 
03.03.2008 at 06:38PM PST, ID: 21037791

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.

 
03.03.2008 at 06:40PM PST, ID: 21037818

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.

 
03.04.2008 at 11:23AM PST, ID: 21044136

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.

 
03.05.2008 at 02:21PM PST, ID: 21055240

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.

 
03.05.2008 at 03:22PM PST, ID: 21055754

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.

 
03.05.2008 at 03:23PM PST, ID: 21055768

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.

 
03.06.2008 at 07:20PM PST, ID: 21067071

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.

 
03.07.2008 at 02:42AM PST, ID: 21068825

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.

 
03.10.2008 at 11:26AM PDT, ID: 21088845

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.

 
03.10.2008 at 02:33PM PDT, ID: 21090678

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.

 
03.10.2008 at 02:53PM PDT, ID: 21090819

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.

 
03.10.2008 at 09:13PM PDT, ID: 21092997

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.

 
03.11.2008 at 01:04AM PDT, ID: 21093766

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.

 
03.11.2008 at 07:24AM PDT, ID: 21095972

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.

 
03.11.2008 at 02:09PM PDT, ID: 21100395

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.

 
03.11.2008 at 02:22PM PDT, ID: 21100518

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.

 
03.11.2008 at 03:05PM PDT, ID: 21100887

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.

 
03.11.2008 at 03:19PM PDT, ID: 21100980

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.

 
03.11.2008 at 03:26PM PDT, ID: 21101034

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.

 
03.11.2008 at 03:42PM PDT, ID: 21101199

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
  • Automotive
  • 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
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • 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
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • 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
  • Automation
  • 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
  • Web Services
  • 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
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
03.02.2008 at 08:52PM PST, ID: 21029070
Once you have a database, you connect it to your program using an object called a DataSet, and then you connect the fields or controls on a form to the data in the database using a technique called data binding.

When a field in your program, for example a TextBox control, is bound to a column in a database table, you can display the data from that column in the text box, modify the data in the text box and save it in the database, or enter data for a new record and add it to the database.

game-master

 
03.02.2008 at 09:10PM PST, ID: 21029113
Hi game-master,
I already have this setup and every field is saved to the database successfully.  What I am asking is a bit different.  I want to add data to the datagridview via a button (that retrieves today's date) and a textbox in RUN TIME, so that you can actually see a datagridview populate.
thank you
 
03.02.2008 at 09:38PM PST, ID: 21029200
You can create a new row within the dataset and repopulate to the datagrid and then after you need to override datarowdound and atatch the textbox at the second column and ask user to enter the value.
and set it autopostback true with textbox change event.

You will get what do you need.

I hope I was able to answer your query.
 
03.02.2008 at 10:04PM PST, ID: 21029289
Rahu_ketu_patal,
can you demonstrate it via code, I am not familiar with this feature fully yet.
thank you
 
03.03.2008 at 05:36PM PST, ID: 21037548

Rank: Sage

systems_ax,

You can to press a button in the datagridview and in a specific column (of the same row) set the today's date. Then you have a textbox (outside the datagridview) and you enter a numeric value and it will be added on another column of the previous entered date. Is that it ?
 
03.03.2008 at 05:55PM PST, ID: 21037617
hi jpaulino,
i have a button but it is not in a datagridview, it is a separate control. every time this button is pressed "today's date" appears in datagridview visually, so you can actually see the date appear in datagridview.  i have 2 text boxes and when values are entered into these textboxes, these values automatically appear next to the date that was just created under their own columns.  next time when this button is pressed, another date is added to the datagridview as a new record and when 2 values are entered into the 2 textboxes, the code knows that these values belong to this new instance of a date that was just created.
please let me know where I can get some help.
thank you
 
03.03.2008 at 05:58PM PST, ID: 21037637

Rank: Sage

Just two more questions:

1 - Do you have anything done ? Todays date and add to datagrid or anything.
2 - Is the datagridview bound to access table ?
 
03.03.2008 at 06:12PM PST, ID: 21037678
jpaulino,
i do not have any code yet, I am still thinking about how I need to code the button that should populate the date and also know that when it is pressed second time, to generate another record.
I do have the database ready and it is access 2007 and I have not bounded it yet.  I was going to start with the button first.
thank you
 
03.03.2008 at 06:28PM PST, ID: 21037734

Rank: Sage

But you have to think on that. It's diferent if the datagridview it's bound or not and also the update method.

Also why do you press two times on the same button to add two diferent things to the same row ? Why don't you do all at the same time ?

If you have a dataadapter to bound you datagridview to the access table you can update just doing something like this: myDataAdapter.Update(myDataTable)

If the datagridview is not bound then you have to update each time you leave the row.
 
03.03.2008 at 06:38PM PST, ID: 21037791
i will definitely bound the datagridview.  what i need to have a list of different dates and data created for each particular date such as a schedule, but presented within the datagridview as a list.  So, I add today and then specify 10 fruits under "fruit" column and 3 vegetables under "vegetable" column.
I apologize for not being clear in regards to the button pressed twice.  what I meant to say is that when I have already created a date and 2 fields for it already, the next time I press the button to create a new row as the same date, the 2 textboxes will clear and let me add data to the date that was just added, and so on and so on.  I also would like to have an ability to rename the date to anything I want.
can you please tell me on how  can start off or if you know any tutorial on the subject.




 
03.03.2008 at 06:40PM PST, ID: 21037818
so the form will look like this:

datagridview with columns:
date        fruits       vegetable


underneath it will have a button that when it is presses, today's date will automatically populate under column "date",

datagridview with columns:
date        fruits       vegetable
3/3/2008

I think I need to start off to be able to add to the datagridview first.
 
03.04.2008 at 11:23AM PST, ID: 21044136

Rank: Sage

Hi again,

You can do something like this:

' Add a row to the datagridview
Dim source As BindingSource
source  = Me.DataGridView1.DataSource
source.AddNew()

' fills the row with data
Me.DataGridView1.Rows(Me.DataGridView1.RowCount-1).Cells(0).Value = Now.Date.ToShortDateString
 
03.05.2008 at 02:21PM PST, ID: 21055240
hi jpaulino,
I created a new dataset and set it to be 3 columns and then created a relationship with my client table.  I bounded the datagridview to this dataset and have tried your code, but it does not work.  can you upload a working example, please?
 
03.05.2008 at 03:22PM PST, ID: 21055754

Rank: Sage

This is a working example.

But do you want a new on (complet) or do you whant to upload your projetc (or part of it) ?
 
03.05.2008 at 03:23PM PST, ID: 21055768

Rank: Sage

Sorry wrong typo

But do you want a new one or do you want to upload your project (or part of it) ?
 
03.06.2008 at 07:20PM PST, ID: 21067071
I will upload it in a minute,
thank you
 
03.07.2008 at 02:42AM PST, ID: 21068825

Rank: Sage

Ok,

Just say something when it's done!
 
03.10.2008 at 11:26AM PDT, ID: 21088845
jpaulino,
I have uploaded the application and here is the link:
http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=6943

right now the datagridview is bound via a data source, every time I press the button in order to insert the date, it does insert the date "1/1/2008" on a first click and after multiple clicks what the code does is it inserts blank rows and pushes the date to the bottom.  I do not know how to bind a texhbox so that when I type into it, it populates into a datagridview.

thank you.
 
03.10.2008 at 02:33PM PDT, ID: 21090678

Rank: Sage

Try this way:

1:
2:
3:
4:
5:
6:
7:
   Private Sub btnNewDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewDate.Click
 
        Dim row As DataRow = Me.TestDataSet.Clients.NewRow
        row("clientdate") = Now.Date
        Me.TestDataSet.Clients.Rows.Add(row)
 
   End Sub
Open in New Window
Accepted Solution
 
03.10.2008 at 02:53PM PDT, ID: 21090819
jpaulino,
thank you very much it works and populates each row with a date, but how do I bind the textbox so that when I type into this textbox, the "Clienttextcomments" column automatically populates into the second column within the same datagrid next to a particular date during run time.  I found information on how to for instance, click on a field within the datagridview and the textbox will display the pertaining information, but cannot find anything that solves my problem.  I think there should be an id for each date so that each date has its own value in a textbox.
thank you.
 
03.10.2008 at 09:13PM PDT, ID: 21092997
jpaulino,
should I open a different question in regards to the textbox?  where can I find help in regards to what I need.
thank you
 
03.11.2008 at 01:04AM PDT, ID: 21093766

Rank: Sage

You want to add the date first and then in the same row (next columns) add the values from a textbox right ?
 
03.11.2008 at 07:24AM PDT, ID: 21095972
jpaulino,
exactly, how do I do that?
thank you very much.
 
03.11.2008 at 02:09PM PDT, ID: 21100395
jpaulino,
please let me know if I should close this question and create a new question with the same request.
thank you.
 
03.11.2008 at 02:22PM PDT, ID: 21100518

Rank: Sage

I will check now! I've just started my computer.