Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a table here i want to get the values from database and show it there if u click on each value that value should display in another table and show on

suppose in table 1

hello
hi
wel come

if u click on hello
in table 2
hello should come and there is a remove button there also if u click that it should remove
how to do that
Posted
Comments
ZurdoDev 12-Jan-16 7:38am    
1. Please do not text us. It is considered rude. Use full words.
2. This does not make any sense. Where are you stuck?
deepankarbhatnagar 12-Jan-16 7:44am    
Not getting

You have to take two grids for that situation one for display data which is selected from database, and second for display data which is select from first grid.
In first grid you have to write onrowcommand event and in that event you have get selected value and store it in temporary table. and bind that temporary table to second grid.
And for remove you should write event for second grid and delete selected valued from temporary table.
 
Share this answer
 
Hello,

This question has less details to answer,

But if you want to no nothing then these are the steps

1) Create MVC controller and action method to display the data for the table 1

2) Create service methods to pull the table 1 data, insert record in table 2 on clicking table 1 record and delete record in table 2.

3) create client side method to pull the table 1 and table 2 details from server and display to the user

4) create client side(Java script) event handler to handle table 1 row selection and add the row to the the second table.

5) Create client side event handler to handle the delete link click and call server method to delete record.

Hope this will helps.
 
Share this answer
 
Comments
Member 11970398 13-Jan-16 7:00am    
how to show data in 1st table should i use list box because i tried but unfortnitely unsuccessed
Sri Nivas (Vasu) 14-Jan-16 1:13am    
It depends on your requirement. You can use any method to display data to the end user either table or list.
Please go throw the below links you will get idea how to do

http://www.asp.net/mvc/overview/older-versions-1/models-data/displaying-a-table-of-database-data-cs

http://www.codeproject.com/Articles/774228/MVC-Html-Table-Helper-Part-Display-Tables

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