Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi ,

Can u please provide code for deleting a row on click of delete in Asp.net 4.0 MVC3...
This delete button is present in the every row and is dynamically binded in every row.
This row contains checkboxes,textbox,dropdown and Date time calendar.
All these controls must be handled on delete button click.
Posted
Updated 28-May-14 8:13am
v5
Comments
Sergey Alexandrovich Kryukov 20-Sep-12 11:39am    
You require, no kidding? But this forum requires asking questions, not ordering people to do you job. You are probably addressing a wrong forum.
--SA

1 solution

You can do as described below :-

i) While creating the rows dynamically just append the row primary key value to id of the delete icon or add a separate attribute with value of the primary key for the record.

ii) Now on click of the delete icon click just get that specific primary key value from the ID of the icon.

iii) Then make an ajax call to delete the record by passing the primary key of the row. When the row is being deleted rebind the grid/table data.


Hope this will be of help to you.


And yes Sergey Alexanrovich is correct , please have politeness in your questions rather than command.
 
Share this answer
 
Comments
apr1234 2-Jun-14 17:22pm    
der is no commanding... i have updated question... Some times in some tensions we may type in such a way... But is was not to command or any thing!!
And wer did u find the commanding way?

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