469,648 Members | 1,300 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Control in DetailsView Template Row

Using VWD I have an aspx page with a GridView and DetailsView controls, each
using a different AccessDataSource.
The DetailsView is displayed with appropriate data when the user selects one
of the Grid's rows.
In the DetailsView I would like the user to be able to select the sex
(Female, Male, Unknown) by clicking a button on a RadioButtonList control.
To do this I make a template row for the DetailsView, I place a
RadioButtonList in the template. I assign the values: Female, Male and
Unknown to three different Buttons on the RadioButtonList.
I set the RadioButtonList datasource to the datasource used by the details
list.
When I run this, if the Sex field is used as a datafield for the Radio I get
one button with the appropriate sex but the other two buttons do not
display, if I don't indicate the datafield I get a button with the
inscription "System.Data.DataViewRow"
Please point me in the right direction. Should I use a different control
than the RadioButtonList ? How should I configure the datasource and
databindings.
Thanks in advance for your help,
Jim


Jul 5 '06 #1
1 3369
Jim McGivney wrote:
Using VWD I have an aspx page with a GridView and DetailsView
controls, each using a different AccessDataSource.
The DetailsView is displayed with appropriate data when the user
selects one of the Grid's rows.
In the DetailsView I would like the user to be able to select the sex
(Female, Male, Unknown) by clicking a button on a RadioButtonList
control. To do this I make a template row for the DetailsView, I
place a RadioButtonList in the template. I assign the values:
Female, Male and Unknown to three different Buttons on the
RadioButtonList. I set the RadioButtonList datasource to the datasource
used by the
details list.
Either you add the 3 buttons statically, or you use a datasource,
but not both. Here, the former is better, unless you want to create
a table with only 3 items.
When I run this, if the Sex field is used as a datafield for the
Radio I get one button with the appropriate sex but the other two
buttons do not display, if I don't indicate the datafield I get a
button with the inscription "System.Data.DataViewRow"
Please point me in the right direction. Should I use a different
control than the RadioButtonList ? How should I configure the
datasource and databindings.
Just make sure you bind the SelectedValue property of the radiolist:
SelectedValue='<%# Bind("Sex") %>'

--

Riki
Jul 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ben | last post: by
1 post views Thread by Timothy H. Schilbach | last post: by
3 posts views Thread by =?Utf-8?B?QW5nZWw=?= | last post: by
reply views Thread by =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.