Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I m using j query to delete records from db and also from grid.

i successfully deleted records from db and gridview.

but after performing some other actions like edit my grdiview retain its original state means old records displayed but they are not in db.

how to apply changes of client side on server side also in jquery?

Any answer will be appreciated.

code:

JavaScript
var row = $(this).parents('td').parents('tr');
row.remove();


this code remove selected rows from gridview and show correct no of rows in gridview.

JavaScript
var totalRows = $("#<%=grdUserIP.ClientID %> tr").length-1;


but when i run server side code show old records in gridview.

VB
Dim Rows As Integer = grdUserIP.Rows.Count.



How to Solve This?

Thanks.
Posted
Updated 13-Jun-12 22:19pm
v2

1 solution

Hi friend,

var row = $(this).parents('td').parents('tr');
row.remove();


your code removed row, which you don't want. But only your html tags and data, which is available on your browser. But not in website's server related database.

For removing record, you need server side coding and query.


cheers...
 
Share this answer
 
v2

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