Click here to Skip to main content
15,903,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
List<string> AndOr = new List<string>
            {
                " AND ",
                " OR ",
            };
            DataGridViewComboBoxCell ColumnAndOr = (DataGridViewComboBoxCell)(dataGridView1.Rows[0].Cells[3]);
            ColumnAndOr.DataSource = AndOr;


i am using above code to bind Gridview's combobox. and it is showing me both option very well. Now how can i show different values while the actual values (as i describe above) remain same.

Actual Value display value
"AND" "Operation AND"
"OR" "Operation OR"
Posted
Updated 28-Oct-13 6:53am
v3
Comments
CodeBlack 28-Oct-13 7:17am    
can you explain more about the question ?
thatraja 28-Oct-13 8:51am    
Still not clear

1 solution

Here are some options using the Combo Box's DisplayMember and ValueMember properties.
http://stackoverflow.com/questions/3063320/combobox-adding-text-and-value-to-an-item-no-binding-source[^]
 
Share this answer
 

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