473,406 Members | 2,549 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,406 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 1965

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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
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...

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.