or
@(Html.Kendo().Grid(Model)
.Name(
"Grid"
)
.Columns(columns =>
{
columns.Bound(p => p.Name).Width(240);
columns.Bound(p => p.City).Width(170);
columns.Bound(p => p.State).Width(170);
columns.Command(command =>
{
command.Edit();
command.Custom(
"Delete"
).Click(
"PropertyPage.DeleteProperty"
).HtmlAttributes(
new
{ @Id = 5 });
}).Width(166);
})
.Scrollable()
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.Id))
.Read(read => read.Action(
"PropertyRead"
,
"Property"
))
.Update(update => update.Action(
"Update"
,
"Property"
))
.Destroy(update => update.Action(
"Delete"
,
"Property"
))
))
function
editText(e) {
var
text =
this
.dataItem(e.item.index());
text = text.replace(myRegexPattern,
''
);
(?????) = text;
};
var
A = dataSource.add({ dataObjectA });
dataSource.sync();
var
dataObjectB = {
'aId'
: A.id,
'otherData'
: [] };
var
B = otherDataSource.add({ dataObjectB });
dataSource.sync();