Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
update: function (options) {
                               
                       
                                    $.ajax({
                                        type: "POST",
                                        url: url1,
                                    
                                        contentType: "application/json; charset=utf-8",
                                
                                        
                                        data:JSON.stringify({'cid':"1",'ccolor':"raju"}),
                                    
                                        dataType: "json",
                                        success: function (result) {
                                            if (result.d !== "success") {
                                                alert(result.d);
                                            }
                                          dataSource.read();

                                        },
                                        error: function (result) {
                                            alert(result.Id);

                                        }
                                    });
                                    
                                

                            },
Posted
Updated 27-May-14 2:13am
v2
Comments
Thanks7872 27-May-14 8:14am    
Please elaborate question lil bit. Its not clear to me. Whats the issue?
Member 9965416 27-May-14 8:21am    
am trying to update the data in database from kendo grid using web method and jquery ajax.
if i specify the static data in jquery ajax data attribute its updating in database.
am not able to update dynamically by passing the parameters from jquery so can u tell me how to pass parameters to data so that database data is updated............
Thanks7872 27-May-14 8:34am    
Did you mean that there are currently two values: cid and ccolor,it can be 3 or 4 values?
Member 9965416 27-May-14 11:16am    
ya values can be more and i should update the database by editing the grid data for that i should pass the parameters through jquery which calls update web method but am not able to pass the data dynamically like .............................. data: "{'cid':'" + $('#cid').val()+ "','ccolor':'"+$('#ccolor').val()+"'}",
its not working.
Member 9965416 9-Jun-14 2:18am    
I have a hidden field in grid "id" when I click edit and cancel the hidden field data is showing in grid .
I need to get the same data when I click cancel button please help me

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