Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
//1st combobox
DataGridViewComboBoxColumn col1= new DataGridViewComboBoxColumn();
                col1.ValueType = typeof(string);
                col1.Name = "Error Field";
                col1.Width = 25;
                dtErrors = ClassMain.tableBind("select DISTINCT Error_Field from ClientFeedBackError");
                col1.DataSource = dtErrors;
                col1.ValueMember = "Error_Field";
                col1.DisplayMember = "Error_Field";

                dataGridView1.Columns.Add(col1);

//2nd comboboxcolumn

                DataGridViewComboBoxColumn col2 = new DataGridViewComboBoxColumn();
                col2.ValueType = typeof(string);
                col2.Name = "Error Value";
                //col2.DataSource = 
                dataGridView1.Columns.Add(col2);
// col2 would be like "select Errorvalue from ClientFeedBackError where Error_Field = 'ANTEILA'"

i have two datagridview comboBoxcolumn on datagridview.i need to update the 2nd comboboxcolumn on the basis of 1st one.
----select Errorvalue from ClientFeedBackError where Error_Field = 'ANTEILA'

ANTEILA is the 1st value of comboboxcolumn col1.

Thanks for any Help!!!
Posted
Updated 16-Feb-15 1:45am
v2

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