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
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
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
Could you provide a sample project? Please attach it to this post.
Regards,Atanas Korchev
the Telerik team
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();
}
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
Is the next release available to us? I was told minor releases may be restricted?
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
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
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.
Atanas Korchev
the Telerik team