Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2006, 01:49 PM
Authorized User
 
Join Date: Jul 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data from Dropdown List to TextBox

Hello,
I need to select a value from the dropdownlist-ddlTk & the selected value should automatically go to a text box-tbTk. Any coding help will be highly thankful.

Thanks

 
Old July 10th, 2006, 06:05 AM
vbn vbn is offline
Authorized User
 
Join Date: May 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

If you populate the listbox with the dataset and click on the items nothing will happen. We must add a few lines of code to set the current row in the DataSet every time the user selects an item in the listbox control.

To change the current location in a DataTable, use the BindingContext object. This object is a property of the form and keeps track of the current position in each DataTable of each DataSet.

Me.BindingContext(myDataSet,"myTable").position=li st1.SelectedIndex
mname.text=myDataSet.Tables("myTable").rows(List1. selectedIndex)(0)

More on this, try this title:"Database programming using VB.Net and SQL server", Secrets of developing an accounting package is revealed.

Regards
bhar









Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting XML data in a dropdown list on asp.net Hughesie78 XML 4 November 27th, 2007 11:50 AM
Updating a textbox from DropDown selection kjord ASP.NET 1.0 and 1.1 Professional 4 November 7th, 2006 04:04 AM
Data Access Page dropdown list blank? kalebson Access 1 October 4th, 2006 07:44 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
Remove value of dropdown list when textbox changed sn00pyg4rfi3ld Javascript How-To 1 January 20th, 2005 07:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.