Setting Radio Buttons In A DataList

  • Thread starter Thread starter pierre.basson
  • Start date Start date
P

pierre.basson

Hi,


I have a DataList that contains an image and 3 radio buttons. The radio
buttons are used to change the status of the image i.e. Approved,
Suspended and Deleted. When the form loads, I want to set the Radio
button to the image's current status. Does anyone know how I can do
this?

Thanks in advance.
Pierre
 
just use DataBindings.. ?? I think you bind a datatable to your datalist..
I assume you have a column in your table shows the status of an image and
named as "Status"
I only making up scenario...
If Status =1 means that image is Suspended
If Status =2 means that image is Deleted
For the checked property of suspended checkbox write something like this <%#
DataBinder.Eval(Container.DataItem,"Status")==1 %>
and like this...

I am not sure i am fully understand the question. I hope this helps u....
 
Back
Top