Hi,
Column Style in Infragistics is not working specifically for DropdownList and DropDown.
Please review my code and anyone help me.
public partial class Form6 : Form
{
InitializeComponent();
}
dtData.Columns.Add("Col_1");
dtData.Rows.Add(dr);
dtData.AcceptChanges();
this.ultraGrid1.DataSource = dt;
//UltraComboEditor myComboEditor = new UltraComboEditor();
//myComboEditor.DropDownStyle = DropDownStyle.DropDownList;
//myComboEditor.Items.Add(new ValueListItem("Key1", "Value1"));
//ultraGrid1.DisplayLayout.Bands[0].Columns[0].EditorControl = myComboEditor;
My designer code:
this.ultraGrid1.Name = "ultraGrid1";
this.ultraGrid1.Text = "ultraGrid1";
The cell is editable even after i set the style to DropDownList ..
You need to set the ValueList property of the column. The grid will use teh value list items as the items in the drop down. You should do this and any other initialization in the IntializeLayout event of the grid.
private void grid_InitializeLayout(object sender, InitializeLayoutEventArgs e) {
ValueList = new ValueList();
// add value list items
e.Layout.Bands[0].Columns["Col_1"].ValueList = vl;
HOWTO:What is the best way to place a DropDown list in a grid cell?