Click here to Skip to main content
15,889,682 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hai,
I am a newcomer to this field.I am doing a project in that,I need to copy the selected RowData on button click(Which is present in itemTemplate Mode) from primary GridView to the Secondary GridView.
I am using Datatable for storing intermediate values.It is Working fine when i click Once,But for the second Time The Next Data Overlaps The present. New Row is not generating for next Iterations.
Please.Can Anyone Help in This Section.


Thanks Earlier
With regards
Nanki
Posted

1 solution

Dear Friend,

When you click on the button to move the row from first grid to second grid then the first time the data gets visible into the second grid but when you again click on button to move the row from first grid to second grid then it overlaps the existing row. If this is your problem then you do one thing before moving the second row to second grid, store the second grid already added row into a datatable with same structure as the second grid and then merge this datatable with the row coming from the first grid.

dtsecond.Merge(dtone)


Please follow this link :- Merge Datatable[^]

Don't forget to mark this as your answer if it helps you out.

Thanks
 
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