This is a migrated thread and some comments may be shown as answers.
Problem with Update Inline et readonly (did not return JSON)
9 Answers 102 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jerome
Top achievements
Rank 1
jerome asked on 28 Oct 2010, 08:44 AM
Hello

I've got a problem

I have a grid with Edit InLine (Ajax). And I have juste 2 colonne can be aditable.
When I click on Edit Button, I put something in the textbox end I press the enter Key, and I have the message : "
The requested URL did not return JSON"

If I have 3 Colonnes Editable It's works

Any one can help me

is it a bug??
Thx for help


9 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 29 Oct 2010, 12:28 PM
Hi Jerome,

Could you please elaborate a bit more on your scenario. How do you define your RadGrid - declaratively or programmatically. How do you bind the RadGrid - using advanced data binding or using declarative data sources? Also it will be helpful if you could post your RadGrid declaration with the code behind code.

Looking forward for your reply.

Kind regards,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
jerome
Top achievements
Rank 1
answered on 29 Oct 2010, 12:48 PM
Hi

I used Telerik Grid MVC

Take the project EditingAjax and put all columns except one to readonly
Put edition in "Inline"
When you click edit, just one textbox is editable
Press enter in this textbox and the error message appears

Excuse my poor english

I'have a project test but where I can upload it??



Thx
0
Atanas Korchev
Telerik team
answered on 01 Nov 2010, 03:41 PM
Hi jerome,

 Could you provide a sample project? Please attach it to this post.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Steve
Top achievements
Rank 1
answered on 02 Nov 2010, 06:28 AM
We have a similar problem:
Ajax Editing a grid row with a single data column results in the JQuery Alert ("The requested URL did not return JSON")
When Ajax editing a grid with mutlple columns, pressing enter after making an edit is Ok.
Does Sitefiniy have  working example code for a single column edit grid?

Cheers
Steve

View:
<%=Html.Telerik().Grid<Colour>()
                              .Name("Colours")
                              .DataKeys(keys => keys.Add(c => c.Id))
                              .ToolBar(commands => commands.Insert())
                              .DataBinding(dataBinding => dataBinding.Ajax()
                                                              .Select("Show", "Colours")
                                                              .Insert("Insert", "Colours")
                                                              .Update("Save", "Colours")
                                                              .Delete("Delete", "Colours"))
                              .Columns(c =>
                                           {
                                               c.Command(commands =>
                                                             {
                                                                 commands.Edit().ButtonType(type);
                                                                 commands.Delete().ButtonType(type);
                                                             }).Width(100).Title("");
                                               //c.Bound(o => o.Id).Hidden(true);
                                               c.Bound(o => o.Id).ClientTemplate(
                                                   "<input type='checkbox' name='checkedRecords' value='<#=Id #>'  />")
                                                   .Title("Select")
                                                   .Width(80)
                                                   .Sortable(false)
                                                   .Filterable(false)
                                                   .HtmlAttributes(new {style = "text-align:center"});
                                               c.Bound(o => o.Value);
                                           })
                              .Pageable(paging => paging.PageSize(4))
                              .Resizable(resize => resize.Columns(true))
                              .Sortable()
                              .Scrollable()
                              .Filterable()
                              .Scrollable(scrolling => scrolling.Height(450))      
                              //.Selectable()todo e.stopPropagation(); bug
                              .ClientEvents(events => events.OnRowSelect("onRowSelect"))
                              .HtmlAttributes(new {style = "margin-bottom: 1.3em"})
            %>
   /// <summary>
    /// Private method to Save a new object Or update an existing object.
    /// </summary>
    /// <returns>ActionResult</returns>
    public ActionResult SaveOrUpdate()
    {
        //Create a New Instance of the Colour Object
        var colour = new Colour();
        if (ViewData.ModelState.IsValid)
        {
            //TryUpdateModel will fill the object with the details.
            //If id is available N-hibernate will update it 
            //for new object without id new records will be created.
            if (TryUpdateModel(colour) && colour.IsValid())
            {
                //The model is valid - insert the Colour details and redisplay the grid.
                ActionConfirmation updateConfirmation =
                    colourManagementService.SaveOrUpdate(colour);
                if (updateConfirmation.WasSuccessful)
                {
                    TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()] =
                        updateConfirmation.Message;
                }
            }
        }
        return View(new GridModel(colourManagementService.GetAll()));
    }
    /// <summary>
    /// Allows saving the object through service.
    /// </summary>
    /// <param name="id">Identifier of the Object</param>
    /// <returns>ActionResult</returns>
    [Transaction]
    [AcceptVerbs(HttpVerbs.Post)]
    [GridAction]
    public ActionResult Save()
    {
        return SaveOrUpdate();
    }
0
Rosen
Telerik team
answered on 02 Nov 2010, 01:12 PM
Hi Steve,

Indeed, I was able to observed the described behavior. However, I'm happy to inform you that we have managed to address it. Therefore, the fix will be available with the next official release of the Telerik Extensions for ASP.NET MVC.

Best wishes,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Steve
Top achievements
Rank 1
answered on 04 Nov 2010, 08:48 AM
Ok, thanks...we are using Open Source version of Telerik MVC Extensions at the moment but do have  Sitefinity licences.
Is the next release available to us? I was told minor releases may be restricted?

0
Atanas Korchev
Telerik team
answered on 04 Nov 2010, 08:56 AM
Hello Steve,

 Indeed service pack are available only to commercial license holders. However we will soon release the Q3 major release which is available as open source license.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Steve
Top achievements
Rank 1
answered on 04 Nov 2010, 10:02 AM
Thanks Atanas,

When is Q3 release available for download? 

On a (maybe) related issue we experience problems with Ajax Client Templates in the Telerik Grid:
Specifically:
 

1. Client Edit template column not working - The drop down is not setting correct values. while adding a new records or editing an exisitng record. This is visible in Firefox 3.6.10 3, Making the grid selectable, causes the edit/delete actions not to work.

2. Sorting/Filter not working on the Client template column.


Happy to provide some code examples if necessary, but maybe you know if it is an acknowledged problem and available in next release?

Cheers
Steve
 
0
Atanas Korchev
Telerik team
answered on 04 Nov 2010, 10:25 AM
Hello Steve,

The Q3 release is due this month. Can't be more specific.

Please open a new forum thread and provide a sample project with regards to the other issues. Both are not any thing known.

Greetings,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
jerome
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
jerome
Top achievements
Rank 1
Atanas Korchev
Telerik team
Steve
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or