Click here to Skip to main content
15,881,755 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Here,
I want to add multiple items on click on add button, which mention below image.
when users add on button, to in txtqty,Text value is display on gridview, again same thing,
means, multiple time users can click on add button one by one, and then after click on submit button,
so all values are inserted in database which id is employee name.

click here for view image
Posted
Updated 26-Jul-14 21:46pm
v2
Comments
What is th issue here?
Pratham4950 27-Jul-14 3:48am    
issue is how can i add multiple time item's,
See my answer and add comment inside the answer box, if you need more help.

1 solution

You need to add item to the DataSource of the GridView and bind the GridView again. If you need to insert that to Database, then do so first. Retrieve the rows again and bind to GridView.
 
Share this answer
 
Comments
Pratham4950 27-Jul-14 4:08am    
right, but multiple items add are temporary, so i don't think it require to insert in database.
may be it's add in array or something else.
Then you can add that to a DataTable and store that in ViewState, so that you can always access in the same page anytime.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900