This is a migrated thread and some comments may be shown as answers.

update grid from EditorTemplate hyperlink value

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tam
Top achievements
Rank 1
Tam asked on 23 Nov 2015, 05:41 PM

When the user clicks Update the cell in the grid isn't being populated with the EditorTemplate hyperlink value.

EditorTemplate:
@(Html.Kendo().Editor()
.Name("EVIDENCE")
.HtmlAttributes(new { style = "width: 250px;height:25px" })
.Tools(tools => tools.Clear().CreateLink())
.Value(@<text> </text>)
)

view:
<div class="wide-grid">
@Html.AntiForgeryToken()
@(Html.Kendo().Grid(Model.TASKs)
.Name("TasksGrid")
.Columns(columns =>
{
columns.Command(command => { command.Edit(); }).Width(50);
columns.Bound(c => c.STATUS).Visible(false);
columns.ForeignKey(c => c.RESP_ORG_ID, (System.Collections.IEnumerable)ViewData["RespOrgs"], dataFieldText: "RESP_ORG_DESC", dataFieldValue: "RESP_ORG_ID").Title("Resp Org").Width("200px");
columns.ForeignKey(c => c.ACTIVITY_ID, (System.Collections.IEnumerable)ViewData["Activities"], dataFieldText: "ACTIVITY_DESC", dataFieldValue: "ACTIVITY_ID").Title("Activity");
columns.ForeignKey(c => c.SOURCE_DOC_ID, (System.Collections.IEnumerable)ViewData["SourceDocs"], dataFieldText: "SOURCE_DOC_DESC", dataFieldValue: "SOURCE_DOC_ID").Title("Source Doc").ClientTemplate("<a href='#=SOURCE_DOC_PATH#'>#=SOURCE_DOC_DESC#</a>").Width(125);
columns.ForeignKey(c => c.ROLE_ID, (System.Collections.IEnumerable)ViewData["Roles"], dataFieldText: "ROLE_DESC", dataFieldValue: "ROLE_ID").Title("Role");
columns.Bound(c => c.RESP_ORG_ID).Visible(false);
columns.Bound(c => c.ACTIVITY_ID).Visible(false);
columns.Bound(c => c.ROLE_ID).Visible(false);
columns.Bound(c => c.DOC_REF).Width(75);
columns.Bound(c => c.DUE_DATE).EditorTemplateName("DueDate").Width(75);
columns.Bound(c => c.COMPLETED).Width(75);
columns.Bound(c => c.TASK_DESC).EditorTemplateName("TaskDescription").Width(500);
columns.Bound(c => c.EVIDENCE).EditorTemplateName("TaskEvidence").Width(15);
columns.Bound(c => c.CTL_NO);
columns.Bound(c => c.ACQUISITION_ID).Visible(false);
})
.ToolBar(toolbar => toolbar.Create().Text("Add New Task"))
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Filterable()
.Groupable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(15)
.ServerOperation(false)
.Events(events => events.RequestEnd("requestEnd"))
.Model(model =>
{
model.Id(a => a.TASK_ID);
})
.Update(update => update.Action("Edit", "Task").Data("sendAntiForgery"))
.Read(read => read.Action("TaskGrid_Read", "Task", new { id = @Model.ACQUISITION_ID }))
.Create(create => create.Action("Create", "Task").Data("sendAntiForgery"))
)
)
</div>

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 25 Nov 2015, 08:31 AM

Hello Tam,

I covered the question in the support thread on the same topic. Let's continue the discussion there.

Regards,
Dimiter Madjarov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Tam
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or