Hi Pratheep,
We are able to reproduce the problem at our end. Since the data holds the __type property after returning from the Ajax POST, the server handle arguments didn’t recognize them. It is the cause of the problem. So we suggest to either delete this property before binding data to the Grid or else prevent the same in server end. This has been applicable to server events of all the ASP Elements. Refer to the following code example.
<script type="text/javascript">
function bindproduct(Productcode, Productname) {
$.ajax({
type: "POST",
url: "workorder.aspx/bindproduct",
datatype: "json",
contentType: "application/json",
data: JSON.stringify({ "Productcode": Productcode, "Productname": Productname }),
success: function (msg) {
for (var i = 0; i < msg.d.length; i++) {
delete msg.d[0].__type;
}
var materialGridObject = $("#ProductGrid").ejGrid('instance');
alert(materialGridObject);
materialGridObject.dataSource(msg.d);
},
});
}
</script>
|
Regards,
Seeni Sakthi Kumar S.