[wix-users] How come the RTF content in the ScrollableText be modified dynamically using session.Database.OpenView and InsertTemporary

Shintaro Takechi devst119 at gmail.com
Thu Nov 5 15:49:05 PST 2020


Hi,

Thanks to this question ( https://stackoverflow.com/a/33679439/1076116 ), I
was able to make a custom action that temporary update and modifies the MSI
Database on the fly.

In a nutshell following is the custom action code that I have to update the
Table. I have dialog EndDlg with ScrollableText control Verification.

```
var view = session.Database.OpenView("SELECT * FROM Control WHERE
Dialog_='EndDlg' AND Control='Verification'");
view.Execute();
var record = view.Fetch();
view.Delete(record);
record.SetString("Text", sRtfText);
view.InsertTemporary(record); // also tried original post's
view.Modify(ViewModifyMode.InsertTemporary, record); as well but no luck
```

However, upon the End Dialog is opened, somehow, the updated text is gone
and default text is shown.

When I do check for the text column, in the custom action, I can see that
it has been updated properly. (I checked ahead of modification via CA to
make sure default WAS there and IS UPDATED).

Just for the sake of it I made another custom action that is separate from
this custom action just to check for the Text entry in the EndDlg
Verification Control and it is properly updated. And it was updated
properly as expected.

I thought it may be due to the fact that EndDlg is called via OnExit, so I
added the same control in the first dialog, but the result is the same, the
Text is not updated on the screen (actually the text is removed).

If it is updated properly, why is it gone?


More information about the wix-users mailing list