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
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.
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.
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.