I am trying to use a JQuery command to call the Create action on a grid. Reason for this is that i need to pass an external id to the create command that is currently stored in a hidden HTML input field.
Here is the code
HTML
<
input
type
=
"hidden"
id
=
"acctid"
value
=
""
>
Script
function insertnotes(e) {
var accId = document.getElementById("acctid").value;
alert(accId);
$("#Child").data("kendoGrid").dataSource.create({ accountId: accId });
//$("#Child").data("kendoGrid").dataSource.read({ accountId: accId });
}
GRID
.Create(create => create.Action("Account_Master_Notes_Create", "AccountMaster"))
Action in Controller
public ActionResult Account_Master_Notes_Create(string acctid,
[DataSourceRequest]DataSourceRequest request, Account_Note_Master account_Notes_Master)
The alert in the script is telling me that acctid is populated... i just want to call the create action.... the error i am getting is that dataSource.create is not a function
Thanks for any help on this issue.
Corey