Thanks Gary for the reply. the link you shared helps me a lot. but I had encountered another problem using the expandable datagridView.
My datagrid consists of 4 columns, string column (treeView), combobox, linklabel and string column. Below is my code.
-
foreach (KeyValuePair<int, string[]> name in nameDictionary)
-
{
-
parentNameNode = helper.getName(name.Value[i]);
-
-
//treeView1.Font = new Font(null, FontStyle.Bold);
-
parentNode = rootNode.Nodes.Add(parentNameNode);
-
parentNode.DefaultCellStyle.Font = new Font("Verdana", 7, FontStyle.Bold);
-
-
if (name.Value.Length > 1)
-
{
-
-
for (int a = 0; a < name.Value.Length; a++)
-
{
-
-
childNode = parentNode.Nodes.Add(readerName.Value[a], "aaaa", "Start");
-
childNode.DefaultCellStyle.Font = new Font("Verdana", 7, FontStyle.Regular);
-
-
-
}
-
}
-
Question:
How could I populate the comboBox column? I am getting this error "DataGridViewComboBoxCell value is not valid".
Please help me.