如何根据 数据库中得出的名称,匹配哪个 radiobutton 选中?
真的不知如何写了。

解决方案 »

  1.   

    1.要麼自定義根據得出的名稱指定其radiobuttion;
    2.也可以使用dbradiobuttion組件,指定其數據集和字段值
      

  2.   

        for i:=0 to cxGBxgxx.ControlCount-1 do
        begin
          if (cxGBxgxx.Controls[i] is TcxRadioButton) and (TcxRadioButton(cxGBxgxx.Controls[i]).Caption :=trim(FieldValues['parent'])) then
            TcxRadioButton(cxGBxgxx.Controls[i]).Checked :=True;
        end;但那个caption处就是编不过去。
      

  3.   

    语法错误for i:=0 to cxGBxgxx.ControlCount-1 do
      begin
      if (cxGBxgxx.Controls[i] is TcxRadioButton) and (TcxRadioButton(cxGBxgxx.Controls[i]).Caption =trim(FieldValues['parent'])) then
      TcxRadioButton(cxGBxgxx.Controls[i]).Checked :=True;
      end;