473,324 Members | 2,268 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,324 software developers and data experts.

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(combobox1.selectedItem,DataRowView).item(1) )=DataGrid1.item(datagrid1.currentRowIndex,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(comboboxName.selecteditem,datarowview).item( 1).tostring
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 1961

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

Similar topics

1
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...
4
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
by: Balamurukan | last post by:
How to retrive property values from our own property window
3
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...
0
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...
4
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...
5
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...
4
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.