or
<div class="form-group" show-errors> <div class="col-md-10 col-sm-8"> <div class="row"> <label id="sectionText" for="txtNarrative" class="col-xs-12 control-label" style="text-align: left;">{{formData.sectionTitle}}</label> <div class="col-sm-12"> <div ng-class="{'has-error' : frmSection.txtNarrative.$invalid && frmSection.txtNarrative.$dirty}"> <textarea kendo-editor="txtNarrative" ng-model="rptSectionText.narrative" id="txtNarrative" name="txtNarrative" class="form-control" ng-required="true" k-encoded="false" k-tools="editorTools" style="height: 400px;" stylesheets="['/Content/KendoEditor.css']"></textarea> </div> </div> </div> <div class="row" style="margin-top: 10px;"> <div class="col-sm-6"> <input type="radio" name="status" value=0 ng-disabled="!formData.editing" ng-model="rptSectionText.status" /> Draft <input type="radio" name="status" value=1 ng-disabled="!formData.editing" ng-model="rptSectionText.status" /> Submitted <input type="radio" name="status" value=2 ng-disabled="!formData.editing" ng-model="rptSectionText.status" /> Approved </div> <div class="col-sm-6"> <div class="pull-right"> <input type="button" class="btn btn-default" ng-show="!formData.editing && formData.editable" value="Edit" ng-click="toggleEdit()" title="Edit the selected section text" /> <input type="button" class="btn btn-danger" ng-show="!formData.editable && rptSectionText.id" value="Revise" ng-click="toggleReview()" title="Remove the Approved status to allow editing" /> <input type="button" class="btn btn-danger" ng-show="formData.editing" value="Undo" ng-click="undoChanges()" title="Undo any changes made to the section text since it was loaded or last saved" /> <input type="submit" class="btn btn-success" ng-show="formData.editing" ng-disabled="frmSection.$invalid" value="Save" ng-click="submitForm()" title="Save any changes made to the section text (document remains checked out)" /> <input type="button" class="btn btn-default" ng-show="formData.editing" value="Close" ng-click="closeEditor()" title="Check-in the document once all changes have been saved" /> </div> </div> </div></div>// Set the editor to read-only until the user selects "Edit"...$scope.$on("kendoWidgetCreated", function (event, widget) { // The following code which is the recommended way to modify the editor didn't work because the "if (widget === $scope.txtNarrative)" statement never returned true? //if (widget === $scope.txtNarrative) { // console.log("Found narrative widget..."); // $($("#txtNarrative").data().kendoEditor.body).attr("contenteditable", $scope.formData.edit); //} var editor = $('#txtNarrative').data('kendoEditor'); if (editor !== undefined) { editor.body.contentEditable = false; $('.k-editor-toolbar').hide(); }});// Set the editor to read-only until the user selects "Edit"...$scope.$on("kendoWidgetCreated", function (event, widget) { // The following code which is the recommended way to modify the editor didn't work because the "if (widget === $scope.txtNarrative)" statement never returned true? //if (widget === $scope.txtNarrative) { // console.log("Found narrative widget..."); // $($("#txtNarrative").data().kendoEditor.body).attr("contenteditable", $scope.formData.edit); //} var editor = $('#txtNarrative').data('kendoEditor'); if (editor !== undefined) { $('#txtNarrative').kendoEditor({ imageBrowser: { transport: { read: "imagebrowser/read", destroy: "imagebrowser/destroy", create: "imagebrowser/createDirectory", uploadUrl: "imagebrowser/upload", thumbnailUrl: "imagebrowser/thumbnail", imageUrl: "/content/images/{0}" } } }); editor.body.contentEditable = false; $('.k-editor-toolbar').hide(); }});
public class TempPart { public int DealerProductId { get; set; } public string SupplierCode { get; set; } public string Supplier { get; set; } public string ProductNumber { get; set; } public List<string> AlternativePartNumbers { get; set; } }function updateAltNumbers(e) { var id = $(e).closest("div").find("input[name='dpId']").val(); var dataItem = $('#partsGrid').data('kendoGrid').dataSource.get(id); var dataItemColumn = dataItem.get("AlternativePartNumbers"); var i = 0; $('#AltNumbersList_' + id).find('input').each(function (e) { dataItemColumn[i++] = $(this).val(); }); dataItemColumn.length = i; dataItem.set("AlternativePartNumbers", dataItemColumn); $('#partsGrid').data('kendoGrid').dataSource.sync(); }public bool Update { get; set; }dataItem.set("AlternativePartNumbers", dataItemColumn);dataItem.set("Update", true);$('#partsGrid').data('kendoGrid').dataSource.sync();