Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
i have datalist which pick value from my database.so i want when i click image button after that all values are transfer in my griedview.and again click image button second value are transfer my griedview.and one variable store total transfer value.
Posted
Comments
VIPR@T 17-Oct-12 8:40am    
Have you tried anything for that? Please post that code here.
Tejas Vaishnav 17-Oct-12 9:35am    
what you have tried?

you can go like, create one data table with column to store your data-list value selected by you. and add rows based on your image button click, like if i click on 1 item then add row with containing value of first item to your data table and so on.
then bind that data table to your grid so it will display content to grid what you have store in your data table.
you need to store that data table to your session or any thing else so you can globally access it's value. once if data table is created then only insert new rows to existing data table.
and for displaying total transfer value, you can simply count the rows from data table it will return row count.

1 solution

suppose you want to add 10 more records to gridview after every click.

>> after every click, store 10+ number in viewstate["rows"] and retrive top 10 or viewstate["rows"] from datalist and set it as datasource to gridview..
 
Share this answer
 

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