We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,787 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to assign several rows under same column and store in database(Vb 2010)

i created a database with Item_No,Item_name,Qty,Price,Total,Grand total

i took a form and dragged and dropped that database as details view. first i arranged labels in row format and their respective text boxes under them. and i made copies of text boxes of first row text by holding Ctrl key upto 4 rows .but when i debugged only first row text box values are assigining to database. but the copies which i made not assigning to data base

So how can i bind them to database and allow them store in my database

Kindly see this image for reference link:http://www.mediafire.com/?e0nn3iv9a4jz7uv

3
Contributors
2
Replies
2 Days
Discussion Span
5 Months Ago
Last Updated
3
Views
charuwaka
Newbie Poster
5 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Clean and zip your project, then upload please.
It sounds as if you may have copied the databindings when you copied the textboxes, you should have gotten a compile error if that were the case however.

john.knapp
Posting Whiz in Training
221 posts since Oct 2012
Reputation Points: 25
Solved Threads: 22
Skill Endorsements: 3

i took a form and dragged and dropped that database as details view. first i arranged labels in row format and their respective text boxes under them. and i made copies of text boxes of first row text by holding Ctrl key

The details view is just that the details for a single record. The origianl textboxes created by the drang 'n drop are bound to the naviagtor that should also have been create by that operation. The textboxes will show the details for the currently selected record indicated in the naviagor position box. Even if you correct the binding definition that got lost when copying. Each row would show the same data.
Clipboard01

To have multiple rows of details, you would need to have multiple binding navigator (or some other binding method) set up for the additional rows a where each sucessive row would be incremented one greater thean the row above. But what happens if your retrieved data has less than four rows like shown in the picture. If this case you would have to have code to remove the binding and blank out the empty rows. Yes it can be done, but it will involve a fair amount of coding to achieve.

If you want multiple rows, use a datagridview.

TnTinMN
Practically a Master Poster
640 posts since Jun 2012
Reputation Points: 418
Solved Threads: 148
Skill Endorsements: 13

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0627 seconds using 2.7MB