How to set a cell in code on a DBAdvGrid

Consider the following example:

I have a DBAdvGrid, in Page Mode, linked to the following query:
   select CODE, NAME, F1||F2 FLAGS from MYTABLE   
(Code and Name are strings, F1 and F2 are Y/N chars [In my case, they come from a function on the database])

The grid will show something like this:

CODE   NAME         FLAGS
ABC      Alphabet     YY
ZZZ       Snoozing     NN

The final column in the grid is editable, and the user can type, eg YY, YN, NY, NN.
(The OnEditCellDone method does some updating of the database, based on these flags.)

Now, although the user can type into the cells, and the value of Cells[2,Row] changes, if I try to set the value in code, for example Cells[2,Row]:='YY' the cell isn't updated.

Is there some other method that I need to call, or variable that I need to set, that typing into the cell does but setting the cell directly doesn't, that will enable me to set the cell in code.

Programmatically changing the cell values will not be reflected in the dataset. For updating the dataset, please do this directly at dataset level and the update dataset field values will be automatically reflected in the grid.