472,121 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

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 3418
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.