Datagridviewcmbobox column problem

Dec 10 2008 9:54 AM

i have added a datagridviewcomboboxcolumn like this:

 

DataGridViewComboBoxColumn colCategory = new DataGridViewComboBoxColumn();               

                colCategory.Name = "CATEGORY";

                colCategory.DataPropertyName = "CATEGORY";

                colCategory.HeaderText = "CATEGORY";

                colCategory.SortMode = DataGridViewColumnSortMode.Automatic;               

                colCategory.Items.AddRange(new string[] { "Subsystem", "Library", "Unknown", "Hole" });

                this.dgBuildFile.Columns.Insert(1, colCategory);

 

this combobox is not bound to any datasource.

 

when i select any item from the list and go to next cell, the value is not displayed in the cell.  how can i achieve it?


Answers (1)