@(Html.Syncfusion().Grid<FlashHeadAssemblyConfiguration>("FlashHeadAssemblyResultsGrid") .Datasource((IEnumerable<FlashHeadAssemblyConfiguration>)Model) .Column(columns => { columns.Add(model => model.SerialNumber).AllowSearching(true).AllowFilter(true); columns.Add(model => model.RecordedBy).AllowSearching(true).AllowFilter(true); columns.Add(model => model.RecordedOn).AllowSearching(true).AllowFilter(true); columns.Add("Commands", column => { column.Commands(commands => { commands.Command(CommandTypes.Edit); commands.ItemOption(UnboundItemOptions.ImagePlusText); commands.ItemType(UnBoundItemTypes.Button); commands.Text("Edit"); }); column.Commands(commands => { commands.Command(CommandTypes.Custom); commands.ItemOption(UnboundItemOptions.ImagePlusText); commands.ItemType(UnBoundItemTypes.Button); commands.Text("Print Labels"); }); }) .AllowEditing(false) .AllowFilter(false); }) .Editing(editing => { editing.AllowEdit(true); editing.AllowDelete(false); editing.AllowNew(false); editing.CloseOnEscape(true); editing.EditMode(GridEditMode.Dialog); editing.PrimaryKey(key => key.Add(model => model.SerialNumber)); editing.SaveOnEnter(false); editing.Dialog(dialog => { dialog.Draggable(true); dialog.Position(DialogPositions.Center); dialog.Resizable(false); }); }) .Filtering(filtering => { filtering.AllowFiltering(true); filtering.FilterBarMode(FilterBarMode.Immediate); filtering.FilterDropDownType(FilterDropDownType.SimpleList); filtering.FilterMode(FilterMode.Default); filtering.ShowFilterStatusMessage(true); }) .PageSettings(paging => { paging.AllowPaging(true); paging.PageSize(10); paging.PagerPosition(Position.BottomLeft); paging.PagerStyle(PagerStyle.DefaultAndAdvanced); }) .AllowSearching(true) .Mappers(mapper => mapper.SaveAction("UpdateRecord")) )CONTROLLER ACTIONS(some)
public ActionResult FlashHeadResults() { var resultsForGrid = _dataRetrieval.RetrieveMostRecentRecords().ToList(); return PartialView(resultsForGrid); } [HttpPost] public ActionResult FlashHeadResults(PagingParams args) { var resultsForGrid = _dataRetrieval.RetrieveMostRecentRecords().ToList(); return resultsForGrid.GridActions<FlashHeadAssemblyConfiguration>(); } [HttpPost] public ActionResult UpdateRecord(FlashHeadAssemblyConfiguration recordToUpdate) { var resultsForGrid = _dataRetrieval.RetrieveMostRecentRecords().ToList(); return resultsForGrid.GridActions<FlashHeadAssemblyConfiguration>(); }
Hi Chris McNear,
Thanks for using Syncfusion Products.
We regret for the inconvenience caused. We are unable to reproduce your reported issue in our end. We have prepared a simple sample to demonstrate the unbound column with dialog editing and the same can be downloaded from the below link.
Demo Sample: UnboundColumn_DialogEditing.zip
Could you please try to reproduce your issue in the above sample and send back to us so that we could able to sort out the cause of this issue and provide you a better solutions quickly?.
Please let us know if you have any concerns.
Regards,
Bala Murugan A.S