473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 3464
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: sck10 | last post by:
Hello, I am using the code below to set the values of a DetailsView template field using FindControl. My question is how would you find a control if its a Boundfield control? For example,...
4
by: Frits van Soldt | last post by:
Hello, I hope somebody can help me with this! I have 2 listboxes in the edititemtemplate of a detailsview. In the databound event of the detailsview I would like to fill the listboxes...
0
by: Seok Bee | last post by:
Dear Experts, In my web application, I have a Master/Detail display of records using Gridview and DetailsView controls. Whenever, I made a selection of a record from the Gridview control, the...
2
by: Ben | last post by:
Hi, In the code-behind, i can refer to the dropdownlist defined in the aspx file with this (e.g.) dropdownlist1.sekectedvalue = ... but why can i not refer to the label defined in the...
1
by: Timothy H. Schilbach | last post by:
Hi Everyone, I am having a massive issue trying to get custom data into my DV. What I want to do is sooo simple: 1. I have a single DV on a page 2. I created my own template (see below) 3....
2
by: Paulo | last post by:
What is DetailsView, FormView, DataList, Repeater components? Any differences? VS 2005 asp.net C#
3
by: =?Utf-8?B?QW5nZWw=?= | last post by:
I seem to understand how the control works as long as I mated to SqlDataSource or ObjDataSource it works fine. But I do not want to flatten my design in this manner. I am interested in how I can...
2
by: bogdan | last post by:
Hi, Can a single GridView be 'connected' to DetailsView that renders itself differently based on the currently selected row? I have a GridView with rows that could be displayed in the same way...
0
by: =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?= | last post by:
In VS2008, I have a DetailsView control with a checkboxlist control inside its Edit template. (1) I want the checkboxlist to be dynamic and display only as many checkboxes as a user setting is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.