This question is locked. New answers and comments are not allowed.
I am trying to create my own edit button and am having a very hard time attempting to get the data to populate inside the popup. The window opens and is completely blank. The data object has all the needed json data.
Thanks
Ryan
Thanks
Ryan
@{ Html.Telerik().Window() .Name("EditWindow") .Title("Edit Window") .Buttons(b => b.Close()) .Visible(false) .Modal(true) .Width(600) .Height(600) .Draggable(true) .Resizable() .Render(); } @{ Html.Telerik().Grid(Model) .Name("Grid") .DataKeys(dataKeys => dataKeys.Add(c => c.Id)) .Columns(columns => { columns.Bound(o => o.PartNumber).Width(100); columns.Template(@<text> <input type='button' value='Edit' onclick="updateRecord('@item.Id')" /> <input type='button' value='Delete' onclick="deleteRecord('@item.Id')" /> </text>); }) .Groupable() .Sortable() .Pageable() .Filterable() .Render(); } @section footer { <script> function updateRecord(id) { var url = '@Url.Action("CustomEdit", "Gage")'; $.post(url, { id: id }, function (data) { var window = $('#EditWindow').data('tWindow'); window.content(data); window.center().open(); }); } function deleteRecord(id) { var url = '@Url.Action("CustomDelete", "Gage")'; $.post(url, { id: id }); } </script>}