/// <summary> /// Gets the list of authorization types in an editable list view model. /// summary> /// <returns>returns> public IActionResult AuthorizationTypesEditableList() { //var vm = new LookupDataEditableListViewModel(); List<AuthorizationType> l = GetLookupItemList<AuthorizationType>().ToList(); //foreach (var i in l) //{ // vm.Items.Add(i); //} //if (TempData.ContainsKey("SourceCallerMessage")) //{ // ViewBag.Messages = TempData["SourceCallerMessage"]; //} ViewBag.datasource = l; return View(); }
public ActionResult UpdateAuthorizationTypeAsync([FromBody]CRUDModel<AuthorizationType> m) {
// IF I SET A BREAK POINT IT IS NULL HERE!!! var val = m.Value; var v = Update(val, val.Id); return ListAuthorizationTypes(); }
<ej-grid id="FlatGrid" allow-paging="true"> <e-datamanager id="dataManager" adaptor="remoteSaveAdaptor" json="(IEnumerable<object>)ViewBag.datasource" insert-url="DataManagement/AddAuthorizationType" update-url="DataManagement/UpdateAuthorizationTypeAsync" /> <e-edit-settings allow-adding="true" allow-editing="true" allow-deleting="true" edit-mode="Normal">e-edit-settings> <e-columns> <e-column field="Id" header-text="ID" is-primary-key="true" text-align="Right" width="25">e-column> <e-column field="Description" header-text="Description" validation-rules='new Dictionary<string, object>() { {"required",true}, {"minlength",3} }' width="80">e-column> <e-column field="CreatedOn" header-text="Created On" type="DateTime" format="{0:MM/dd/yyyy H:mm:ss tt}" width="75">e-column> <e-column field="ModifiedOn" header-text="Last Modified" type="DateTime" width="75">e-column> <e-column field="ModifiedBy" header-text="Modified By" width="80">e-column> <e-column field="SynchKey" header-text="Synchronization Key" width="80" allow-editing="false" visible="false">e-column> <e-column field="Status" header-text="Status" edit-type="DropdownEdit" text-align="Right" width="30">e-column> e-columns> ej-grid>
I finally figured it out. I had a bad date format and it could not deserialize.