Array
(
)

Ajudem-me c/ RadioButtonList setar propiedade Enabled

Dicotau
   - 01 fev 2007

Olá! preciso de Ajuda

Qro setar a propriedade Enabled de acordo com a montagem dinâmica do RadioButtonList de acordo com uma condição.

Olha esse codigo:

unit WebForm1;

interface

uses
System.Collections, System.ComponentModel,
System.Data, System.Drawing, System.Web, System.Web.SessionState,
System.Web.UI, System.Web.UI.WebControls, System.Web.UI.HtmlControls;

type
TWebForm1 = class(System.Web.UI.Page)
{$REGION ´Designer Managed Code´}
strict private
procedure InitializeComponent;
{$ENDREGION}
strict private
procedure Page_Load(sender: System.Object; e: System.EventArgs);
strict protected
RadioButtonList1: System.Web.UI.WebControls.RadioButtonList;
procedure OnInit(e: EventArgs); override;
private
{ Private Declarations }
public
MyArray: array[0..20] of String;
end;

implementation

{$REGION ´Designer Managed Code´}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWebForm1.InitializeComponent;
begin
Include(Self.Load, Self.Page_Load);
end;
{$ENDREGION}

procedure TWebForm1.Page_Load(sender: System.Object; e: System.EventArgs);
var
i: integer;
begin
for i := 0 to 20 do
begin
if (i mod 2=0) then
begin
MyArray[i] := ´HabilitaPropriedadeEnabled ´+i.ToString;
end
else
begin
MyArray[i] := ´DesabilitaPropriedadeEnabled ´+i.ToString;
end
end;
DataBind;
end;

procedure TWebForm1.OnInit(e: EventArgs);
begin
//
// Required for Designer support
//
InitializeComponent;
inherited OnInit(e);
end;


end.