Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










Forms Data Controls :: How To Use Dropdownlist Selection To Populate Textbox With Database Field


Iwould likethe user to select an item from a drop down list. Next to the drop down is a textbox or label control.From the ddl selection I would like to populate the textbox or label froma database with a corresponding field fromthe database the dropdownlist was populated from.On selectindexchange eventI canpopulate the textbox with theUnique id from the value, but I need toinput adifferent field into the textbox. Can I use some sort of variable toassign the Textbox.Text = ?


View 6 Replies (Posted: Feb 15, 2011 07:00 PM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: DropdownList Selection To Populate TextBox?
I have a dynamically generated dropdownlist, that lists e.g. Company Names. I want to be able to select a particular Company and display associated information e.g. Name, Address, City, State... etc. in text boxes adjacent to the list.

I am trying to fire the following code from the dropdownlist "OnSelectedIndexChanged" property, but cannot 1) get the code to fire upon selection, and 2) populate the text boxes...

[code]...

Posted: Sep 14, 2010 05:06 PM

View 5 Replies!   View Related
Forms Data Controls :: Cannot Populate The Textbox With Selection From Dropdownlist
Cannot populate the textbox with selection from dropdownlist

[Code]....

Posted: Oct 27, 2010 03:39 PM

View 6 Replies!   View Related
Populate A TextBox From A DropDownList Selection Javascript
I have a DDL and ASP.NET Textbox. I would like to populate the text box with the option I choose from the DDL. I need this to be instant and not use postbacks so it would seem JavaScript would be the obvious choice here. I have done quite a bit of searching but everything I have found seems to be for standard HTML (Selects and Inputs) and these do not appear to work with ASP objects:

<asp:DropDownList runat="server" ID="DDLSalesPerson" DataValueField="keyid" DataTextField="FullName" />
<asp:TextBox runat="server" id="txtSalesPerson" />
My DDL is populated from SQL in the code-behind page.

Posted: Feb 7 at 15:10

View 3 Replies!   View Related
Web Forms :: Populate Textbox Using SQL Database Query / Depending On A Dropdown List Selection
I would like to alter the query that is run, depending on the selection made by the user in a drop down list on the same page. Would this best be done using a partial page update (AJAX)? Ideally it would be great to have the textbox result change quickly once the drop-down list value has changed, without a full page postback. I would like to change the SQL query to a completely different query if the user selects an option different to the default (page_load value) in the drop-down list. I would then like the newly retrieved result to be displayed in the textbox as before.

My current VB function looks like this:

[Code]....

Posted: Apr 08, 2010 08:31 PM

View 2 Replies!   View Related
Forms Data Controls :: Populate A Textbox With The Contents Of A Formview (or Even A Single Field)?
I have an email contact form that I have successfully populated the account users Username and email address into text boxes

I also use a text box and session variables to send parameters to a stored procedure and return a single row result in a form view.

The thing I am having an incredibly hard time figuring out is how to populate a single textbox with the data from any of those fields. or the whole control as a single summary.

Just for starters I am actually an IT Manager and NOT a coder so this is entirely a hack job if there ever was one...

here is my aspx code

<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/RMSWeb.master" CodeFile="Service2.aspx.cs" Inherits="_Default" %>

Posted: Jun 24, 2010 10:09 PM

View 1 Replies!   View Related
Web Forms :: Populate Dropdownlist From Another Dropdownlist Selection?
I have 2 dropdownlist, one is to dropdown department, and another dropdown staffnames. the secong dropdownlist will based on the selection of department as each department has different staffs i have 2 tablesdepartment and staff in my database ,in my department table i have departmentid asPK and departmentname, in my staff table i have staffname and departmentid as FK. So my ques is how am i going to populate staffname in the dropdownlistaccording to the selection of department.

Posted: Dec 29, 2010 05:48 AM

View 9 Replies!   View Related
Web Forms :: Populate Listbox From Dropdownlist Selection?
1) 1 dropdownlist - department

2)Search button

3) 1 listbox that will display all the staff according to the selection of its department

So when iselect the department and click search button, the listbox will be populated with the staff names.

Posted: Jan 03, 2011 01:57 AM

View 3 Replies!   View Related
Web Forms :: Populate GridView Based On DropDownList Selection
I have a dropdown list that selects a student and a gridview that I would like to populate based on the selected student. When the student is selected the page posts back and the id of the selected student is correctly written to a test label. However the gridview does not get populated with any data. I have run the select query in sql server and it works correctly. Why is gridview not getting databound? TIA - Steve

[Code]....

Posted: Oct 02, 2009 03:05 PM

View 1 Replies!   View Related
Web Forms :: Populate A Textbox On Basis Of Drop Down Selection?
I am using asp.net 3-tier architecture, language c# for creating a web application. In presentation layer, I want to populate a textbox when I select an option from a drop down list. Under the code sample from .aspx page is given:

<asp:TableRow ID="TableRow4" runat="server">
<asp:TableCell ID="TableCell5" runat="server">
<asp:Label ID="lblCat" runat="server" Text="Product "></asp:Label>

[code]...

Posted: Jul 03, 2010 06:37 AM

View 2 Replies!   View Related
Forms Data Controls :: Update Database Field With Textbox OnChange?
I've been searching for a tutorial or example on how to update my database when I change the text in the textbox that is in a DataList?

Posted: Jan 20, 2010 04:52 PM

View 8 Replies!   View Related
How To Change Data Display In A TextBox From A DropDownList Selection
how to get result from DDL that can automatically changes the display in the TextBox. Our each item has got more than one size and sometimes the price will be different when you click on a different size. How can I implement this function?

Here is my sample code:

[code]....

Posted: May 07, 2009 10:18 AM

View 4 Replies!   View Related
Forms Data Controls :: Populate A Datagrid On Selection From A Drop Down List?
This is my first post as a newbie to asp.net.

I am in the process of creating a "news system", you can add, edit and delete news. The news items can be entered into the SQL database and you select a category where you want the news item to go into.

What I want is when someone comes to the "Edit" screen, they have a drop down list and what that does is allows you to select a category for you to edit news items from, so rather than at present having the "Edit" page display all the news items, I want people to be able to choose a category that they can edit news items in.

So far my edit page has a datagrid with the following code:

[code]....

Posted: Mar 17, 2011 04:03 PM

View 4 Replies!   View Related
Web Forms :: Populate Dropdownlist With Column Name For Search Field?
populating the dropdownlist with column name. I have a gridview that has 7 columns . I want to have a textbox search and dropdownfield where user can select column name and type a word in search box and click search so that text for that column name is being search and displayed in grid. how I can fetch just column names from DB and search ?

Posted: Apr 16, 2010 03:20 PM

View 8 Replies!   View Related
Forms Data Controls :: Populate Tree Based On Drop Down Menu Selection
I have written a code that populates data from database into the tree using C# and is working perfectly , the thing is how can i populate the tree based on a selection from a drop down menu

the code to populate the tree is below :

[code]....

Posted: Mar 24, 2011 12:17 PM

View 4 Replies!   View Related
Forms Data Controls :: Pass Selection From Dropdown List To SQL Query And Populate Gridview?
I am rather new to VS 2005 but begining to make progress. I have a gridview being populated with a hard coded SQL query and it works fine. However, I would like to be able to have a drop down list, select from the drop down list and pass that selection into a SQL query asa parameter. I have the drop list in the code with my two options. I have been searching but I have not been able tofigure it out. Here is my code below....it is working but just need to know what do I add/change to pass my selction into the query and then populate the gridview.

ASPX file....

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test99.aspx.vb" Inherits="test99" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>......

VB Codefile....

[Code]....

Posted: Nov 16, 2009 02:55 PM

View 7 Replies!   View Related
Web Forms :: Can DropDownList Selection Disable Another TextBox RequiredFieldValidator
Is there anyway to disable a textBox's validation(RequiredFieldValidator) base on the selection of dropDownList ?

Posted: Jul 21, 2010 06:05 PM

View 5 Replies!   View Related
DataSource Controls :: Populate Label / Textbox From Dropdownlist In Insert Item Template
I've been trying to find a solution to my problem for about 2 days now, and have found nothing. I am new to .net and not really sure how to accomplish this.I have 4 tables in a database, Vendors, RepairCos, Cons, ConRepairHistory. What I'm trying to do is make a page called SendOutForRepair.aspx that has a insert item template where the first control is a dropdownlist that is attached to the Cons table (got this figured out) and is populated with the Serial Number field. I would like the selection from the dropdownlist to populate the 2nd control (VendorID) that is also from the Cons table....

Posted: Nov 19, 2010 11:09 AM

View 1 Replies!   View Related
Web Forms :: Populate Label / Textbox From Dropdownlist
I've been trying to find a solution to my problem for about 2 days now, and have found nothing. I am new to .net and not really sure how to accomplish this.I have 4 tables in a database, Vendors, RepairCos, Cons, ConRepairHistory. What I'm trying to do is make a page called SendOutForRepair.aspx that has a insert item template where the first control is a dropdownlist that is attached to the Cons table (got this figured out)and is populated with the Serial Number field. I would like the selection from the dropdownlist to populate the 2nd control (VendorID) that is also from the Cons table.

example record from Cons Table: Serial number VendorID
508585 1

so when 508585 is selected in the dropdownlist, it would populate VendorID with 1 (this is my issue)once this happens, the user would fill in the other fields (hours, issue, repairco (also a dropdownlist linked to RepairCos table), RA Number, DCI, DPU, DRB, Cost, Record (which is a identity field and primary key for table) and when the insert link is pressed will insert all11 fields as a new row in the ConsRepairHistory table. so the new record in the ConsRepairHistory table would look like:

Serial Number VendorID Hours IssueRepairCoID RA Number DCI DPU DRB Cost Record
508585 1 2250alarming 22022211/16/201011/17/2010 null null 3

theRA Number, DCI, DPU, DRB, Cost all allow null values.

Posted: Nov 18, 2010 11:35 AM

View 9 Replies!   View Related
Forms Data Controls :: A Required Input Field DropDownList If Old Records Have Null In This Field?
I have a DetailsView on the page and I have made one of the fields a TemplateField. In the EditItemTemplate and InsertItemTemplate I have a DropdownList that is databound to a table in my Sql Server database. I wanted to add an initial value to the DropdownList
namely "- select -" .

I set the AppendDataBoundItems property to true and added the initial value as a ListItem.Markup of the DropdownList

<asp:DropDownList ID="DropDownList_HP" runat="server"

AppendDataBoundItems="True" DataSourceID="SqlDataSource_HP" [code]...

This works fine for new input. The problem is however that the database already has records that were entered through a Windows Application and many of these records has a null value in this field and exceptions are thrown when I tried to open these records
and the system tried to set the SelectedValue of the DropdownList.After some more searching I found this help

http://msdn.microsoft.com/en-us/library/ms366709.aspx

So I changed the ListItem in the DropDownList markup to the following:

<asp:DropDownList ID="DropDownList_RefHospDV4" runat="server"

AppendDataBoundItems="True" DataSourceID="SqlDataSource_RefHosp" [code]...

This now solved the problem of opening a record where the value is null in the database, BUT now the RequiredFieldValidator is not validating anymore to make sure that a databound item is selected for this field and not the initial value "- select -". So basically now it is not checking anymore to see if valid input has been entered for the DropDownList and it accepts "- select -" thus it acts as if the field is not a required field anymore.

In short what is required is that I want to make sure that the user enters a valid selection in the DropDownList, but it must also cater for old records that do not have this field entered yet so that those old records can be opened in the DetailsView .Opening Old records (with null in that field):When these old records are opened in the DetailsView the DropDownlist should show "- select -" when the value in the database is null.

Saving records (old or new records):When saving the record in Insert mode or Update mode the RequiredFieldValidator should show that a valid input is not selected if the DropDownList is still on "- select -".

Posted: Apr 01, 2011 08:08 AM

View 1 Replies!   View Related
Forms Data Controls :: Data Populate From One Dropdownlist To Second One Dropdownlist?
I am using 3 dropdown list in a gridview and the values for the dropdownlist is dynamic from database.based on first dropdown list selected value the values must fill to second dropdown and based on second dropdownlist selected value then items should load to 3rd dropdown and same for 4th dropdown list. Here if i select age,gender,sex, fist name, last name from the template name Human. The first drop down only populate the fields like Age,gender,Sex and so on., When the second dropdown list populate from the fields corresponding Template name Human, Finance, and so on.

Posted: Dec 02, 2010 08:43 AM

View 3 Replies!   View Related
DataSource Controls :: Populate Textbox Or Label From Database?
I am trying to Populate a label or a textbox a Primary Key Value from a Data base.My goal is to enter this value into serveral other tables in the same DB. The DB is called Record_Review.mdf and it is local to this machine through asp.net. The table im pulling from is tblDemographics and the column I want to use is CaseID. The bit of code i got so far is:

[Code]....

and i think i need to do something like,

lblCaseID.Text = ds.tables[0].rows[
"CaseID"].toString();,

Posted: Mar 29, 2011 06:16 PM

View 4 Replies!   View Related
Forms Data Controls :: Multi Selection In DropdownList?
How can I have multi selectionusing DropDownlist?

Posted: Nov 12, 2009 09:43 AM

View 7 Replies!   View Related
Forms Data Controls :: Populate A Dropdownlist From Other
When someone selects one of the search criteria, I want the other dropdownlist boxes to re-populate with only the information from the current search and take out all other information if that makes sense. This search functionality works except it the dropdownlist boxes stay populated with all information originally loaded from the database. Here is my code:

[Code]....

Posted: Jan 28, 2011 09:58 PM

View 7 Replies!   View Related
Forms Data Controls :: DropDownList Selection Populated By Query
I have an ASP DropDownList that's populated by a query. It works great. However, once a value is selected, I want to retrieve another field from the database, based upon that value.My SQL statement to populate the DropDownList is: select DisplayName, Price, Deposit from Trips
and the DropDownList is bound to DisplayName. I could easily write another database query: select Price from Trips where DisplayName = '" + DisplayName.Text "'" but I'd rather avoid the 2nd DB call, especially since I've already retrieved the Price and Deposit in the original recordset. I tried to bind Price and Deposit to hidden TextBox fields, but that fails. It seems that only one retrieved field can be bound to a control at a time.

Here's the code I'm using:
connect.Open()
sqlString = "select DisplayName, Price, Deposit from Trips WHERE IsCurrent = TRUE"
command = New OleDbCommand(sqlString, connect) myReader = command.ExecuteReader()
Trip.DataSource = myReader Trip.DataBind() myReader.Close() connect.Close()

Which populates this
<asp:DropDownList ID="Trip" runat="server" DataTextField="DisplayName">
</asp:DropDownList>

Posted: Dec 11, 2009 01:35 PM

View 2 Replies!   View Related
Forms Data Controls :: Grid Not Populating On Dropdownlist Selection?
On my webform, i have one grid, 2 dropdownlist and one datepicker control.

When i select items from my both dropdown and date from datepicker control,i want to populate my grid based on above mention control selections.

Posted: Dec 28, 2010 06:53 PM

View 5 Replies!   View Related
Forms Data Controls :: DropDownList With Different Display And Selection List?
I have a problem with binding a DropDownList. Let's assume a database five years old with many historical records. In order to enable just working with active data every datasource has a column hidden which is occasionally set by administrator in order to clean up old records.The selection looks like

1) SELECT Id, Value FROM Table WHERE Hidden = 0

The issue arises when the user opens a form with old data. As some records in DropDownListhave have already been hidden an exception is raised as the component cannot find the data for the list. For this case the following selection is valid

2) SELECT Id, Value FROM Table

it is possible to combine these two selection queries? The display value should always use query 2 while the listed values should use the query 1.

Posted: Oct 05, 2010 03:52 PM

View 2 Replies!   View Related
Forms Data Controls :: Gridview Selections To Populate Another Gridview Or Control With Selection From First
I currently have a gridview that has 1 column with radiobuttons. I then have a update button to update all the selected records. But what i want to do is add a step before the update. I want to add a multi-line textbox for each radiobutton selected to allow them to add notes/comments for each record before the update occurs.

Because the textbox will be large to allow them to enter the comments, i wanted to list them out seperately per record selected. Maybe a gridview is not what i need for the 2nd part, but thats the scenario and looking for suggestions on what / how to do it.

Example:

GRIDVIEW1

ID column1 column2 column3 radiocolumn
1 1111 2222 3333Yes / No (selected Yes)
2 2222 3333 4444 Yes / No

GRIDVIEW2

ID NotesColumn
1 Texbox displays here

Posted: Feb 19, 2010 02:24 PM

View 20 Replies!   View Related
Forms Data Controls :: Loading Dropdownlist Based On Selection In Gridview
I am using Asp.net3.5,c#. I am using two dropdownlists in gridview. (ddlmodule,ddlaccount). I am doing ADDNEW,EDIT for grid. I want to load data in ddlaccount based on selection of ddlmodule in grid and DataTextField,DataValueField of ddlaccount are different to each selection of ddlmodule. Means I have to load data from different tables in ddlaccount of grid based on selection of ddlmodule.

My grid is ..
<asp:GridView ID="gvCBBatchline" runat="server" AutoGenerateColumns="false" DataKeyNames="idBatchLines" ShowFooter="True" onrowcommand="gvCBBatchline_RowCommand" > <Columns> <asp:TemplateField HeaderText="idBatchLines" SortExpression="idBatchLines" > <EditItemTemplate> <asp:TextBox ID="txtidBatchLinesEdt" runat="server" Text='<%# Eval("idBatchLines") %>' ReadOnly="true"></asp:TextBox> </EditItemTemplate> <FooterTemplate> <asp:TextBox ID="txtidBatchLinesNw" runat="server" ReadOnly="true"></asp:TextBox></FooterTemplate> <ItemTemplate> <asp:Label ID="lblidBatchLines" runat="server" Text='<%# Bind("idBatchLines") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Batch" SortExpression="iBatchesID" > <EditItemTemplate> <asp:TextBox ID="txtiBatchesIDEdt" runat="server" Text='<%# Eval("iBatchesID") %>'> </asp:TextBox> </EditItemTemplate> <FooterTemplate> <asp:TextBox ID="txtiBatchesIDNw" runat="server"> </asp:TextBox> </FooterTemplate> <ItemTemplate> <asp:Label ID="lbliBatchesID" runat="server" Text='<%# Bind("iBatchesID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Module" > <EditItemTemplate> <asp:DropDownList ID="ddlModuleEdt" runat="server" SelectedValue='<%# Eval("iModule") %>'> <asp:ListItem Text="GL" Value="0"> </asp:ListItem> <asp:ListItem Text="AR" Value="1"> </asp:ListItem> <asp:ListItem Text="AP" Value="2"> </asp:ListItem> </asp:DropDownList> </EditItemTemplate> <FooterTemplate> <asp:DropDownList Width="50px" ID="ddlModuleNw" runat="server"><asp:ListItem Text="GL" Value="0"> </asp:ListItem <asp:ListItem Text="AR" Value="1"> </asp:ListItem> <asp:ListItem Text="AP" Value="2"> </asp:ListItem> </asp:DropDownList> </FooterTemplate> <ItemTemplate> <asp:DropDownList ID="ddlModule" runat="server" SelectedValue='<%# Eval("iModule") %>'> <asp:ListItem Text="GL" Value="0"> </asp:ListItem> <asp:ListItem Text="AR" Value="1"> </asp:ListItem>
<asp:ListItem Text="AP" Value="2"> </asp:ListItem> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Edit" ShowHeader="False"> <EditItemTemplate> <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" Text="Update">n</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"></asp:LinkButton> </EditItemTemplate> <FooterTemplate> <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandName="AddNew" Text="Add New"> </asp:LinkButton> </FooterTemplate> <ItemTemplate> <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" ShowHeader="True" /> </Columns> </asp:GridView>

Posted: Dec 08, 2009 08:09 AM

View 3 Replies!   View Related
Forms Data Controls :: Filtering Gridview Rows From DropDownList Selection
I'm trying to filter data based on the selected value from a drop down list and the according values of a local variable within a gridview_rowdatabound event. For example, if "In Arrears" is selected, the gridview should return all rows where the account balance is less than -100. So far, when I select a value from the dropdown list, it has no effect on the gridview. Here's the code I have:

If (DropDownList1.SelectedIndex = 0) Then
e.Row.Visible =True
ElseIf ((DropDownList1.SelectedIndex = 1)
And (AccountBalance <= -100))
Then
e.Row.Visible = False
ElseIf ((DropDownList1.SelectedIndex = 2)
And (AccountBalance > 100)
And (AccountBalance < -100))
Then
e.Row.Visible = False
End
If

Posted: Oct 30, 2010 07:58 PM

View 6 Replies!   View Related
Using Textbox To Populate A Dropdownlist?
I have a textbox that returns 1 or sometimes more rows.....what I would like to do is basically use that textbox to populate my dropdownlist..See sample data

ID Colour

A red

A white

Bblue

So for example...if the user types in A in the textbox

The dropdownlist should be populated with red and white

and if the user types in B, the dropdownlist should populate with just blue

Posted: Dec 14, 2010 08:22 PM

View 6 Replies!   View Related
Dropdownlist Selection To Change HTML In Textbox?
What I would like to achieve is have 5 dropdownlist and a textbox The First Dropdownlist should have the names of different fonts The 2nd dropdownlist should have Size of fonts The 3rd dropdownlist should have Non Bold or bold The 4rd dropdownlist italics non italics The 5th dropdownlist underscore or non so when you type characters into the textbox ,then I can change certian lines to bigger fonts ,italics etc.

So basically a small simple html editor..I dont want fckeditor or the other html editors out there..they have to many options for the user and I dont want that for certian data store reasons... also I dont want a javascript editor...there must be a way in vb asp.net isnt there?

Posted: Mar 16, 2009 03:27 PM

View 2 Replies!   View Related
Disable Textbox In Gridview Via Dropdownlist Selection?
What I am trying to accomplish that if a user selects "Remaining Balance" from the dropdown list, I then want to make the 'Amount' textbox disabled or readonly so that they cannot enter in anything.

I am not sure where to do the code for this, in the Row_Databound or do a create a separate sub calling the OnSelectedChange event.

Here is part of my asxc

[code]....

Posted: Apr 16, 2009 05:38 PM

View 7 Replies!   View Related
Web Forms :: Populate 1 Dropdownlist From Another Using Databind To Oracle Database
I want to create this scenario: The user selects aschool from ddlSchool and this populates ddlStaff with a list of staffs in that school. i knw the codes for sql database but dont know how to do it for oracle.

Posted: Dec 14, 2010 06:31 AM

View 5 Replies!   View Related
Forms Data Controls :: Get The Selection From Dropdown Into The Textbox?
How can I get the selection from drop'dn into the textbox.

[Code]....

Posted: Oct 19, 2010 08:53 PM

View 4 Replies!   View Related
Forms Data Controls :: Dataview - How To Use Each Field To Populate Other Controls
I have a Dataview that has several fields. I want to use each field to populate other controls. How do I access each particular field?

Posted: Apr 30, 2010 01:33 PM

View 2 Replies!   View Related
Forms Data Controls :: Get Data For Datagridview On Selection Of Dropdownlist?
in my application thr is dropdownlist& datagridview.. on selection of dropdownlist the datagridview should fill.. in my dropdownlist thr is 1st selection is "All" which should show all related records in datagridview..how can i do it?

Posted: Nov 22, 2009 01:32 PM

View 3 Replies!   View Related
Forms Data Controls :: DetailsView: DropDownList Keeps Getting Original Values (user Selection Is Ignored)
I have EntityDataSource for DetailsView which is in Edit mode by default (showin Update, Cancel link buttons).

This datasource also has foreign key called PecID. If I change the value in textbox bound to PecID, it works fine.
Entering IDs is not very user friendly, so I add dropdownlist and new datasource.

When I selectnew value from dropDownList and press update the DropDownList's selection is restored to original (previous) value.
Other values in textboxes are saved as expected.

After few hours of trying to figure out what is going on, I got lucky. I figure out that it is important the order of TextBox and DropDownList in field template.

This is the working order (textbox before DropDownList)

[Code]....

This one doesn't work [Code]....

Posted: Feb 17, 2011 08:43 PM

View 2 Replies!   View Related
Forms Data Controls :: Populate Gridview When You Select The Dropdownlist?
I am trying to populate a gridview when you select the dropdownlist.selected value. I don't want to use the sqldatasource or any other datasource. I am trying my best to achieve this, but didn't succeed till now. One of my friend said that i need to get the selected value from dropdownlist and search for the data in the database using the selectedvalue and populate the dataset and bind to the gridview.

Posted: Jan 20, 2010 06:44 PM

View 2 Replies!   View Related
Forms Data Controls :: DataList/FormView Won't Populate DropdownList?
I have a ddl inside the formview that I can't figure out how to wire up properly. The formview contains detail info, butthe ddl needs to list theentire set to items.Then I wantthe ddl's selected value be set from the recordset intended for the formview. I think it's just a timeing issue s I would like your help. Thanks, - EJM.

Here my code somewhat reduced to save space...

[Code]....

Posted: Sep 17, 2010 02:53 PM

View 4 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved