Monday, March 26, 2012

Setting Radio Buttons In A DataList

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.
Pierrejust 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...
--
Thanks,
Yunus Emre ALPZEN

<pierre.basson@.psitek.com> wrote in message
news:1106915718.710352.38870@.z14g2000cwz.googlegro ups.com...
> 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

0 comments:

Post a Comment