We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

After CRUD event the grid call the DataManager but doesnt refresh the data

Thread ID:





142509 Feb 7,2019 02:15 AM UTC Feb 7,2019 07:01 AM UTC ASP.NET Web Forms 1
Tags: Grid
Nestor Ochoa
Asked On February 7, 2019 02:15 AM UTC

Hi There.

I have a Grid that the data is linked with the DataManager, I can manage to trigger and do the actions but when the Grid calls the Data the second time after the CRUD action, the data is not updated on the Grid, and even the response from the DataManager is with the updated information, what can I do?

   [WebMethod, ScriptMethod(UseHttpGet = false)]
    public static void NotesInsert(Dictionary<string, object> value, string action){

          ... /logic/... all working.


<ej:DataManager runat="server"  ID="gvNotesData" URL="EmployeeUpdateUAT_N.aspx/NotesGet" Adaptor="WebMethodAdaptor"  InsertURL="EmployeeUpdateUAT_N.aspx/NotesInsert" >     

<ej:Grid ID="gvEmployeeNote" runat="server" AllowPaging="true" AllowTextWrap="true" DataManagerID="gvNotesData"  >
                                <EditSettings AllowEditing="false" AllowAdding="true" AllowDeleting="false"></EditSettings>
                                <ToolbarSettings ShowToolbar="true" ToolbarItems="add,update,cancel"></ToolbarSettings>
                                <TextWrapSettings WrapMode="Content" />
                                    <ej:Column Field="Notes" Width="40%" AllowTextWrap="true" HeaderTextAlign="center"   EditType="StringEdit">
                                            <ej:KeyValue Key="required" Value="true"  />
                                            <ej:KeyValue Key="minlength" Value="true" />
                                    <ej:Column Field="LastUpdate" HeaderText="Last Update" HeaderTextAlign="center"  AllowEditing="false" Format="{0:dd/MM/yyyy HH:mm}" Width="12em" TextAlign="Right"   />
                                    <ej:Column Field="CreatedBy" AllowEditing="false"  Width="12em" HeaderTextAlign="center"  /> 
                                    <ej:Column Field="NoteCategoryId" EditType="DropdownEdit" HeaderText="Category" HeaderTextAlign="center" 
                                        ForeignKeyValue="NoteCategoryName" TextAlign="Left" >
                                            <ej:KeyValue Key="required" Value="true"  />
                                    <ej:Column Field="DueDate" AllowEditing="false" HeaderText="Due date" HeaderTextAlign="center"  />
                                    <ej:Column Field="Completed" EditType="BooleanEdit" TextAlign="Center"  AllowEditing="false" HeaderTextAlign="center"  />
                                    <%--  <ej:Column Field="NoteCategoryName" />--%>

Thanks in advance.

Vignesh Natarajan [Syncfusion]
Replied On February 7, 2019 07:01 AM UTC

Hi Nestor, 
Thanks for contacting Syncfusion Support. 
Query#:- The data is not updated on the Grid, and even the response from the DataManager is with the updated information, what can I do? 
We have checked your query and we have prepared sample as per your code example but we are unable to reproduce your reported problem at our end. The new records has been inserted properly on the dataSource.  While checking your code example you have not enabled IsPrimaryKey property in anyone of the columns  which is necessary to perform Editing operations. So we suggest you to enable IsPrimaryKey property. 
Refer to the code example:- 
    <ej:Grid ID="FlatGrid" runat="server" AllowPaging="true" AllowGrouping="true" AllowFiltering="true" AllowSorting="true" AllowSearching="true"> 
           <DataManager URL="/Default.aspx/DataSource"  Adaptor="WebMethodAdaptor" UpdateURL="/Default.aspx/UrlUpdate" InsertURL="/Default.aspx/UrlInsert" RemoveURL="/Default.aspx/UrlDelete" /> 
                <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" /> 
                <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="80" /> 
                  .    .     . 
Kindly refer the below link for the importance of prirmarykey column while performing CRUD action. 
Please get back to us if you have further queries. 
Vignesh Natarajan 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon