I have been searching for an answer and trying out stuff for days now and I still can’t get it to work.
I have Server bound Grid (I can’t use Ajax binding because of whole set of different reasons) and when user edits or inserts a new row I need to do 2 things:
1. I need to pick up all values from hidden fields on the page and put them in an array of int’s.
2. I need to pass this array to the controller on Insert/Update row.
Now with ajax binding I figured out how to do this. I set up javaScript function on client event that does the work. But afaik most of the client events don’t work with server binding so I’m stuck.
onSave Client event would be perfect for this but it doesn’t work with server binding.
Passing a single variable on Insert or Update as a third parameter is easy but my case is a bit more complicated and I can’t get it to work.
.Insert("Insert", "Posudbe", new { })
.Update("Update", "Posudbe", new { })
So I basically need to do those two things in this code above in the third parameter.
Tnx 4 the answers if any.
You can use the onLoad JavaScript event (which is one of the few that work in server binding) and attach a click handler to the “insert” and “update” buttons. You need to use jQuery delegate, live or on. Here is a quick example: