Click here to Skip to main content
13,357,610 members (62,303 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi ,

Can u please provide code for deleting a row on click of delete in 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 13-Sep-12 22:45pm
Updated 28-May-14 9:13am
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.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180111.1 | Last Updated 29 May 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100