[Solved] Unexpected behavior of DBRadioGroup ! lazarus / 16-Databases ---------------------------------------------------------------------- loaded · 2021-01-19 12:24 Hi All, I am using DBRadioGroup to control a 2-state field in my application. When the program is first opened, there is no problem, but if I click on any datacontrol except DBRadioGroup, DBRadioGroup will reset itself. Then, if I manually click DBRadioGroup a few times, the problem goes away. I don't know if I am making a mistake or if this is a problem. Do you think it could be the cause, and how can it be fixed? I would really appreciate if you can help. ---------------------------------------------------------------------- wp · 2021-01-19 14:20 You should post a small demo which shows the issue (pack .pas, .lfm, .lpi, .lpr and database file into a common zip which you can upload via "Attachments and other options"). Write the demo such that it works with a simple dataset, such as TBufdataset, TDBF or sqlite3 -- nobody is willing to install an exotic database engine just to verify an issue of a visual db-control. ---------------------------------------------------------------------- loaded · 2021-01-19 16:03 wp, thank you very much for the answer. While doing an application work to send to form; I noticed that the Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.DBGridOnGetText(Sender: TField; var aText: string; DisplayText: Boolean);begin  if  (DisplayText) then  aText := Sender.AsString;end;procedure TForm1.DBGrid1PrepareCanvas(sender: TObject; DataCol: Integer;Column: TColumn; AState: TGridDrawState);var  MyTextStyle: TTextStyle;begin    MyTextStyle := TDBGrid(Sender).Canvas.TextStyle;    MyTextStyle.SingleLine := False;    MyTextStyle.Wordbreak  := False;    TDBGrid(Sender).Canvas.TextStyle := MyTextStyle;    Column.Field.OnGetText := @Form1.DBGridOnGetText;end; codes I used to display (MEMO) fields as text on the dbgrid caused unexpected behavior on the DBRadioGroup. Then I looked for an alternative solution to this. Located in the https://stackoverflow.com/questions/4809298/lazarus- dbgrid-showing-memo-as-the-value-of-string-fields-in-sqlite-3 link; I learned that the Quote Setting the dgDisplayMemoText property of dbgrid to true recommendation is simpler and smoother. When I applied it, my problem was solved.