how to get selectedvalue from gridview combobox in windows application

Posted by Santosh4u under VB.NET on 1/18/2012 | Points: 10 | Views : 8147 | Status : [Member] | Replies : 3
hi friends,

i have added a combobox type column into griwview and binding this combobox from datatbase
but i am facing problem at the time of select value from that combobox i,e

by using for loop i am finding all the values of cell by row-wise but from gridview combobox not able to get values

Thanks in Advance........

Regards
Santosh




Responses

Posted by: Blessyjees on: 1/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

first find the combo control using FindControl and take the select value of combo box.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santosh4u on: 1/27/2012 [Member] Bronze | Points: 25

Up
0
Down
hi Blessyjees
i needed to do this in windows application gridview..
FindControl methood is not there in windows application...

Thanks in Advance
santosh


Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 1/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Sorry,

Try like this
string data=this.dataGridView1.Rows[0].Cells["column1"].Value.ToString();(this is a c# code)

this will give the select value of the combox in the first row. "column1" specify the column name where you place the combo box.

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response