Displaying the combox value
-
hi, I am having a datagrid with 4 columns and one of the column type is combobox. I am adding items to that combobox column i am able to add it. now i want to display the first item in the combobox by default. Now i am selecting it ,manually help me pls With Regards prasad:)
-
hi, I am having a datagrid with 4 columns and one of the column type is combobox. I am adding items to that combobox column i am able to add it. now i want to display the first item in the combobox by default. Now i am selecting it ,manually help me pls With Regards prasad:)
Hi Set comboObject.SelectedIndex = 0; 0 -> if first item in the list to be displayed by default 1 -> second item ....
Harini
-
Hi Set comboObject.SelectedIndex = 0; 0 -> if first item in the list to be displayed by default 1 -> second item ....
Harini
hi,harini I am getting in normal combobox property like selectedindex. But i am using a datagridview in that one my colummn is made as combobox help me
-
hi,harini I am getting in normal combobox property like selectedindex. But i am using a datagridview in that one my colummn is made as combobox help me
Hi Post your code where you have added values in combo list. Are you adding values during run time or using code behind file? if Design time, then you can give selected=true ...
Harini
-
Hi Post your code where you have added values in combo list. Are you adding values during run time or using code behind file? if Design time, then you can give selected=true ...
Harini
hi,this is adding the all clumns but i want to add single row itself. I am getting error if i add rows saying that value doesn't match for datagridcombox column that is second column. OpenFileDialog ObjOpenFileDialog = new OpenFileDialog(); ObjOpenFileDialog.DefaultExt = "*.cs"; ObjOpenFileDialog.Filter = "CSharp Script Files |*.cs"; if (ObjOpenFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK && ObjOpenFileDialog.FileNames.Length > 0) { Column3.Items.Add(ObjOpenFileDialog.FileName); //scriptDGView.Rows.Add(true, ObjOpenFileDialog.FileName, "", ""); } ObjOpenFileDialog.Dispose(); help me pls