views:

117

answers:

1

I have a page with .Net grid view with about 12 text fields per row and about 250 rows. Right now there is a save all button at the bottom of the page that sends all the fields 12x250 to the server where they are entered into db 1 by one. Which ends up being very slow and some times does not go through at all. I didnt come up with this but ended up with a role of someone to improve it. What I think would be best in this case is to save the field when it looses focus. What is the best way to implement this in .Net with gridview ?

There is already jquery library loaded on the page. There is no ajax currently implemented on the page.

+1  A: 

If you have JQUERY you can call a "Page Method" read through this post, be sure to check the comments I'm not sure if he updated his article:-)

Edit

Additionally you can call a webservice, here's a sample from my code showing me calling a WCF service:

$.ajax({
  type: "POST",
  url: "../Services/Utilities.svc/IsPrintDownloadDone",
  data: "{}", //This should be a JSON representation of yoru inputs that the WCF can serialize into objects
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  success: function(msg) {//msg.d has the response from server
        },  
  error: function (xhr, textStatus, errorThrown) {

}
});
JoshBerke