without any losing time i have to say about my problem .i take pic from my project because its more helpful for Gide me .i have one Telerik MVC grid that it has not any item, when user clicked in number 1 popup window show and user clicked on code and in 3 state user clicked add new button and one row that related to selected id data add to the grid my problem is i handle this problem by Json but i get 500 error in firebug and i cannot see any result in my grid any suggestion would be welcome thanks for advance
$("#btnadd").button().click(function () {
$.ajax({
dataType: "json",
url: "../Shared/GetItems",
data: $("#SparePartCode").val(),
success: function (json) {
var grid = $('#InvoiceItemGrid').data('tGrid');
alert("jsonresualt");
grid.dataBind(json);
}
});
});
private IList<PartBooklet> GetPartBooklet(int sparepart)
{
return _PartBookletService.GetList().Where(m => m.SparePartCode == sparepart).ToList();
}
[AcceptVerbs(HttpVerbs.Get)]
public JsonResult GetItems(int sparepart)
{
var PartbookletList = this.GetPartBooklet((sparepart));
var partbookletData = PartbookletList.Select(m => new SelectListItem()
{
Text = m.Title,
Value = m.Id.ToString(),
});
return Json(partbookletData, JsonRequestBehavior.AllowGet);
}