Using VWD I have an aspx page with a GridView and DetailsView controls, each
using a different AccessDataSourc e.
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.Da taViewRow"
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 1 3484
Jim McGivney wrote:
Using VWD I have an aspx page with a GridView and DetailsView
controls, each using a different AccessDataSourc e.
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.Da taViewRow"
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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, how would I reference the following BoundField ("NTAccount") in
the Sub dvDetail_PreRender sub? Any help would be appreciated...
<asp:BoundField DataField="NTAccount" HeaderText="NT Account" />
|
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
programmatically (not through databinding). If I use
detailsview.findcontrol(controlname) then an empty object is returned. How
can I address these controls?
Thank you for your time.
|
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 detail information of the record will be
displayed in the DetailsView control. Information in the editable in the
detailsview by allowing user to have the edit option. On top of that I also
allow user to add new record through the detailsview...
|
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 TemplateField in the
same aspx file like below?
This gives the error: "can't find control 'mylabel' ":
mylabel.text="ok"
|
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. I created the DetailsViewDataBinging sub which populates the field using
a datatable
4. I created a ModeChanging Event handler to allow me to change the mode
| |
by: Paulo |
last post by:
What is DetailsView, FormView, DataList, Repeater components?
Any differences?
VS 2005 asp.net C#
|
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 programmatically
manipulate the control. In other words maybe just use the data source then
extract from the control the information do with it as I see fit. The
opposite is also true. I want to be able to add or modify the data in the...
|
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 in the
view (like a report) but when a user wants to edit/insert items I'd like to
show a different layout and different controls based on the
selected item type. For example, for some items I'd like to provide text
boxes and for others I'd like...
|
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 configured. How?
(2) Also the column that should depict the checkboxlist selections, is a
simple character column in SSE2005, in the form of a comma-delimited string
(e.g. 1,5,7,12,23). When the DetailsView is loaded, I want each of the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |