This is a migrated thread and some comments may be shown as answers.

Insert not firing for BatchMode editing

2 Answers 74 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
CDK asked on 08 Dec 2019, 09:00 PM

I am attempting to develop a solution based on the example provided at:


As such, I am using BatchMode editing,  binding a client datasource and all insert, update, delete done by calling Web Services from the clientside.


The grid is retrieving and displaying data successfully.  I can update records and delete records, with the respective Web Services being called to update and delete successfully.


However, when I "Add new record", type in values, and hit "Save Changes",  I can see in Chrome developer mode that there is no call to the Web Service so my data is not actually saved.  There are no errors in the console either.


   <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" AllowPaging="false" AllowSorting="true" AllowFilteringByColumn="false" ClientDataSourceID="RadClientDataSource1" >
        <MasterTableView ClientDataKeyNames="KeyName" EditMode="Batch" CommandItemDisplay="Top" BatchEditingSettings-HighlightDeletedRows="true" >
                <telerik:GridBoundColumn DataField="KeyName" HeaderText="Parameter" DataType="System.String" HeaderStyle-Font-Bold="true" />
                <telerik:GridBoundColumn DataField="KeyValue" HeaderText="Value" DataType="System.String" HeaderStyle-Font-Bold="true" />
                <telerik:GridBoundColumn DataField="KeyType" HeaderText="Type" DataType="System.String" HeaderStyle-Font-Bold="true" />
                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" DataType="System.String" HeaderStyle-Font-Bold="true" />
                <telerik:GridBoundColumn DataField="SplitPassword" HeaderText="Split Password" DataType="System.String" HeaderStyle-Font-Bold="true" />
                <telerik:GridClientDeleteColumn HeaderText="Delete" HeaderStyle-Width="70px" HeaderStyle-Font-Bold="true" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="500px" />
    <telerik:RadClientDataSource ID="RadClientDataSource1" runat="server" AllowBatchOperations="true">
            <ClientEvents OnCustomParameter="ParameterMap" />
                <WebServiceDataSourceSettings BaseUrl="API/SysParm.asmx/">
                    <Insert Url="InsertSystemParameters" RequestType="Post" ContentType="application/json" DataType="JSON" />
                    <Select Url="GetSystemParameters" RequestType="Post" ContentType="application/json" DataType="JSON" />
                    <Update Url="UpdateSystemParameters" RequestType="Post" ContentType="application/json" DataType="JSON" />
                    <Delete Url="DeleteSystemParameters" RequestType="Post" ContentType="application/json" DataType="JSON" />
            <Schema ResponseType="JSON" DataName="d" >
                <Model ID="KeyName">
                    <telerik:ClientDataSourceModelField FieldName="KeyName" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="KeyValue" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="Description" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="KeyType" DataType="String" />
                    <telerik:ClientDataSourceModelField FieldName="SplitPassword" DataType="String"  />
                <telerik:ClientDataSourceSortExpression FieldName="KeyName" SortOrder="Desc" />




This is an example of a record in the dataset:


    "d": [{
        "__type": "CAMAPI.SystemParameter",
        "KeyName": "AD_GROUPS_APP_ID",
        "KeyValue": "2",
        "Description": "",
        "KeyType": "APP_ID",
        "SplitPassword": ""


My ParameterMap function is as follows:


function ParameterMap(sender, args) {
    if (args.get_type() != "read" && args.get_data()) {
        var data = "{ \"parameters\": " + JSON.stringify(args.get_data().models) + "}";



Can you see anything to explain why inserts are not working?





2 Answers, 1 is accepted

Sort by
Telerik team
answered on 11 Dec 2019, 11:35 AM



Here are some suggestions which can help you resolve this issue:

1. Ensure that there are no hidden script errors:

2. I can see that there are some difference with the live demo sample. You can try changing these and see whether there is any change. The first one is this event handler:

<ClientEvents ... OnDataParse="Parse" />
3. The Next one are these:
                <Model ID="CustomerID">
4. I am not familiar with your service, but you can compare it with the following:
    public CustomersResult InsertCustomers(string customersJSON)
I hope these ideas will prove helpful in troubleshooting the problem.


Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Top achievements
Rank 1
answered on 17 Dec 2019, 07:41 PM

I had diverged from the example by removing the ReadOnly=true from the first column, as it is my intention for all displayed columns to be editable.

It appears this is not allowed, or else it breaks functionality.     I added a new column to act as the record id, with ReadOnly=true and Visible=false,  which is allowing the other columns to be editable and insert, update, delete all working fine.



Asked by
Top achievements
Rank 1
Answers by
Telerik team
Top achievements
Rank 1
Share this question