RowColumnIndex rowColumnIndex = new RowColumnIndex(DrugGrid.SelectedIndex, 7);
DrugGrid.MoveToCurrentCell(rowColumnIndex);
Syncfusion.WinForms.DataGrid.Interactivity.CurrentCellManager cc = DrugGrid.CurrentCell;
cc.BeginEdit();
cc.CellRenderer.SetControlValue("Test"); // emits "value cannot be set for an unloaded editor"
cc.EndEdit();
and this:
Syncfusion.Data.RecordEntry record = DrugGrid.View.GetRecordAt(DrugGrid.SelectedIndex);
record.Data.GetType().GetProperty("GPackSize").SetValue(record.Data, "Test"); // emits "Property set method not found" but looks fine in intellisense.. so runtime..
DrugGrid.View.CommitEdit();
I understand that essentially you need to set the row and column of the cell you want to edit, move to that cell, enter editing mode, make the edit, end the editing move and commit the change.
That is a LOT of work to change A to B, but, that aside, I am only stuck at the data entry part.
Can anyone clue me in here?
Thanks
edit: I also tried this
var record = DrugGrid.View.Records.GetItemAt(DrugGrid.SelectedIndex); // OK
var changed = DrugGrid.View.GetPropertyAccessProvider().SetValue(record, "GPackSize", "Hello"); // returns true, suggesting "record" was updated
System.Diagnostics.Debug.WriteLineIf(changed, "Value was changed"); // as expected
System.Diagnostics.Debug.WriteLine(record.GetType().GetProperty("GPackSize").GetValue(record, null).ToString()); // writes the OLD value
Do I have to commit changes?
I have also tried View.Refresh() and Grid.Refresh()