Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET MVC3
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 13-Sep-12 22:45pm
apr1234683
Edited 28-May-14 9:13am
v5
Comments
Sergey Alexandrovich Kryukov at 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

Rate this: bad
good
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.
  Permalink  
Comments
apr1234 at 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
0 OriginalGriff 520
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 265
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 29 May 2014
Copyright © CodeProject, 1999-2014
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