- Home
- Forum
- ASP.NET MVC
- After inserting new row, the UI does not display it but in the database is fine
After inserting new row, the UI does not display it but in the database is fine
Hi,
I'm working in edition of data with Grid Control using the URL Adaptor, all works fine except when I inserts a new data row, in that moment it's saved correctly in DB but in the UI is not diplayed the new row until I refresh the page. Do you know if I missing something or incorrect in my code?
This is the view page:
This is part of my code:
And these are the CRUD opertations:
This is when I write the data for the new row and save it:
After save it, the number of rows/elements are fine but the new row doen´t appear.
In DB is fine:
Thanks, regards!
SIGN IN To post a reply.
3 Replies
VN
Vignesh Natarajan
Syncfusion Team
October 10, 2017 02:31 PM UTC
Hi Daniel,
Thanks for using Syncfusion products.
We created a sample with your code example and when we insert a new record in Grid we able to get the new row in UI without refreshing the page. So, we unable to reproduce the mentioned issue in our sample.
Find the code example and sample:
|
@(Html.EJ().Grid<object>("FlatGrid")
.Datasource(d => d.URL("/Grid/GetData").InsertURL("/Grid/PerformInsert")
.UpdateURL("/Grid/PerformUpdate") .RemoveURL("/Grid/PerformDelete").Adaptor(AdaptorType.UrlAdaptor))
.AllowPaging() /*Paging Enabled*/
.EditSettings(e => e.AllowEditing().AllowDeleting().AllowAdding())
.ToolbarSettings(tool => tool.ShowToolbar().ToolbarItems(item =>
{ |
C#
|
public ActionResult PerformInsert(Employee value)
{
. . . .
}
//Perform update
public ActionResult PerformUpdate(Employee value)
{
. . . .
}
//Perform delete
public ActionResult PerformDelete(int key)
{
. . . . .
} |
Sample: http://www.syncfusion.com/downloads/support/forum/133116/ze/SyncfusionMvcApplication29-1341425479
To find out the root cause, we need the following details.
1. Did you get the new data in response window of an network tab(Console page).
Find the screenshot:
|
|
2. If possible, replicate the issue in the attached sample.
3. Essential Studio Version details.
Regards,
Vignesh Natarajan
DA
Daniel
October 10, 2017 03:28 PM UTC
Hi!
I found what was missing with the example that you attached, I needed to return the value of the object that was inserted instead a true value:
Thanks for the help!
Regards.
VN
Vignesh Natarajan
Syncfusion Team
October 11, 2017 02:33 PM UTC
Hi Daniel,
Thanks for the update.
We are the glad that your issue has been resolved.
Please get back to us if you need further assistance.
Regards,
Vignesh Natarajan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
DA Daniel
- Oct 9, 2017 07:47 PM UTC
- Oct 11, 2017 02:33 PM UTC