Html Razor code
this code use in Edit view
@{Html.RenderAction("ActionNotes", "Prospects");}
Ajax code
write ajax code in ActionNotes view.
var $dt = @jQueryDataTable.Init("#tblActionNotes"
, new DataTableOption(Model.List.Items)
{
AjaxSource = Url.Action("ActionNotes"),
Dom = @IsOperator ? (((Model.UserRights & (int)CrmPermission.Add) == (int)CrmPermission.Add|| Model.TotalAccess) ? null : "<\'row-fluid\'<\'span6\'F><\'span6\'>><\'row-fluid\'r>t<\'row-fluid\'<\'span3\'i><\'span3\'l><\'span6\'p>>" ) : (((Model.RoleRights & (int)CrmPermission.Add) == (int)CrmPermission.Add) ? null : "<\'row-fluid\'<\'span6\'F><\'span6\'>><\'row-fluid\'r>t<\'row-fluid\'<\'span3\'i><\'span3\'l><\'span6\'p>>" ),
DeferLoading = Model.List.TotalItems,
CreateUrl = Url.Action("ActionNoteNew","Prospects", new { id = Model.ProspectId }),
Columns = new[] {
new DataTableColumnOption { Data="CreatedOn", Title="Date", Width="15%" },
new DataTableColumnOption { Data="CreatedByUserName", Title="Operator", Width="15%" },
new DataTableColumnOption { Data="ToOperatorName", Title="Assign Operator", Width = "15%"},
new DataTableColumnOption { Data="Note", Title="Note" },
new DataTableColumnOption { Data="FollowUpDate", Title="Followup Date", Width="15%" },
new DataTableColumnOption { Data="Type", Title="Type", Width="10%" },
new DataTableColumnOption { Data="Status", Title="Status", Width="10%" },
new DataTableColumnOption { Data="Id",Title = "Action", Width="80px", Render = "actionNoteActionRender", Sortable = false }
},
})
});
i use this code for call another controller and view for display two different view in single view, using this code second view is display properly and i can see data on edit view in (right click) page source but i can not display data on edit view page.