473,657 Members | 2,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i get values from datagrid



Hi,

How can i get values from datagrid to combobox and should select the same
name as in datagrid row on the combobox control
In my vb.net windows application ,i have combobox which is populated by
sqlserver database table.When i select value from combobox ,value saved in to
other table of my database
and i use to datagrid to show this table.

Myproblem is ,
i want to get text value from datagrid and my combobox should select this
value (Which i selected before) when i want to update values in datagrid
e.g
combobox
-----------
John
George
Tom <- i select tom and saved to my datagrid table.

Table of DataGrid
---------------------
Name Age Country
Tom 29 USA

i want to update Tom and i m selecting this row

Combobox
------------
Tom <-----should selected automatically
i want to do something like that but i couldn't:
(cytpe(combobox 1.selectedItem, DataRowView).it em(1))=DataGrid 1.item(datagrid 1.currentRowInd ex,1)))
by the way there is no combobox on datagrid but i use independent combobox
on my form which is populated by another table on my database .

i select name field from combobox
enter age and country from textboxes and then i save these values to other
table on my database.

and i used this code for combobox to save value to the related part of
datagrid

ctype(comboboxN ame.selectedite m,datarowview). item(1).tostrin g
and there is no problem with this...

The problem is getting values from datagrid and select this value in
combobox...

Thanks again...

Thanx.

Jul 21 '05 #1
0 1987

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4285
by: Derek | last post by:
Another DGrid question... I can not access the values of a cell in a datagrid unless I make them visible. I do not want these fields displayed. I only want to use the values to run a stored procedure off of. I access them right now using the item.cell().control method. Here's the code:
4
1485
by: Job Lot | last post by:
On form load my datagrid gets populated with values from database table. How can I reset values in my DataGrid to 0 on click of a button? thanks
2
2008
by: Balamurukan | last post by:
How to retrive property values from our own property window
3
4927
by: Kevin Pedersen | last post by:
Hello, I am using an editable datagrid. After I save the changes the datagrid shows the old values. I've read the posts about the Page_Load and not binding the datagrid each time. The SQL that is being sent to the database is correct and the changes are eventually being made. If I refresh the page after the update then the new values appear. I noticed that when I put a breakpoint in my update handler everything works fine. When I take...
0
1052
by: Mike | last post by:
I've got an app with a DataTable that gets passed around and modified by datagrids on 3 different asp.net pages. Not all columns need to be displayed, but I need them all in the datagrid so I can call the LoadDataRow method to update the DataTable "in place". I've been using boundcolumns for the invisible fields, which worked fine, but now I've run into an issue with them. On the second of the 3 pages, the user can modify certain...
4
2576
by: Vik | last post by:
How can I display the lookup values in a datagrid? E.g., the datagrid displays a table that contains a ProductID field. I want to display a Product description from a Product table in that datagrid. Currently I use a join between the main table and the lookup table to get the Product description. Is it possible to use a dropdownlist in the datagrid to display and select (in Edit mode) the lookup values? Thank you.
5
1381
by: Coleen | last post by:
Hi all :-) We are using a DB2 database connection through a class module to get the data into a datagrid in an aspx web page using VB.Net. I can get the data into the first datagrid with no problem, however, since I need to do a bunch of calculations with these values AND pull values for two session variable within the web application, I need to create another datagrid to display the calculations. Here is what I'm doing: ...
4
1357
by: Shawn | last post by:
This must be easy, but I can't find a way to do it. I have a datagrid displaying Rows from a Datatable. I want to take the values in the Row and ultimately use them in a SQL Where string. I would like to take the values and enter them into a String Variable, but can't find a good way to do this with more than 1 value.. Help!! Thanks, Shawn
0
272
by: Gamze | last post by:
Hi, How can i get values from datagrid to combobox and should select the same name as in datagrid row on the combobox control In my vb.net windows application ,i have combobox which is populated by sqlserver database table.When i select value from combobox ,value saved in to other table of my database and i use to datagrid to show this table.
0
8395
marktang
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...
1
8503
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,...
0
8605
tracyyun
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...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6166
isladogs
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...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.