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

Update of row causes row to disappear

1 Answer 289 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 12 Jun 2013, 08:46 PM
I am binding a grid to a datasource. The datasource is configured with a model. I use the transport configuration to read/write data. There is a dropdown column bound to another static datasource.
When I make an edit to a field and click the Update command button, the row disappears, but the space for it is still there. If I then update another field, the row collapses completely. 
The data does save and it will show up on a page refresh (in my real real project, not the attached demo).
Attached is a VS2012 project showing the problem. It is not my working project that actually connects to the database, etc, but it does still demonstrate the issue.
Also attached is a screenshot.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 14 Jun 2013, 01:30 PM
Hi Robert,

 
After reviewing the provided data it seems that the issue comes from that the server returns invalid response on "Update" action. Please note that on "Update" action the server should return either empty object or the updated record:

e.g.: 

public void ProcessRequest(HttpContext context)
{
    context.Response.ClearHeaders();
    context.Response.ClearContent();
    context.Response.Clear();
    context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
    context.Response.ContentType = "text/json";
    context.Response.ContentEncoding = Encoding.UTF8;
             
    //the server should return empty object or the updated record
    //if there are errors on the server they should be included in errors collection
    context.Response.Write("{}");
 
    context.Response.Flush();
    HttpContext.Current.ApplicationInstance.CompleteRequest();
}

 Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or