Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Here is my problem:
I have a datagridview and combobox, both populated by a datasource. The problem is that there is a hidden text field on the grid whos value should show in the combbox. I do not want this value to be a part of the datasource or added to the combobox list. I just want the following:


column 1 col 2 combobox col hidden field
a 95 cx,bx,dx,rx rx

So the hidden field value would show up in the combobox as returned from the dataset. The combobox is fine all the fields show up but i need to PASS THE HIDDEN FIELD to the combox programatically before a selection is made, So that RX is the defaulted highlighted text shown on the grid in the combobox column without .does this make sense?

1 record on the grid would look like the following
column 1 col 2 combobox col hidden field
a 95 rx(is shown) rx
and BX,RX,DX,MX
are still in the drop down list
Posted
Comments
Sunasara Imdadhusen 6-Sep-10 7:15am    
Hi,
i have solution, but before that, i would like to confirm following from your end:
1. Gridview has combobox and Hidden filed?
2. Based on hidden field value combobox should be selected?

Please do let me know if i am wrong to understand your problem.

I will be able to do correct answer after you replay.

Thanks,
Imdadhusen

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900