Hi,
I want a column that has a drop down with a list for most rows, but for the first two rows I want it to just be a read only cell that the user cannot interact with nor allow any kind of drop down action or display to display.
Here's the code I currently have:
column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;
column.ValueList = (ValueList)formatItem.LookupList;
but I can't figure out how to make the first two row/cells for that column readonly and not display the drop-down list.
Thanks,
You could do something like this:
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Index == 0 || e.Row.Index == 1) { e.Row.Cells["column Key"].Activation = Activation.NoEdit; } }
I would try using an event like AfterRowActivate to set the properties related to the drop-down. I would set the ValueList property to null when in rows 0 and 1, otherwise to you drop-down.
private void ultraGrid_QuickBooksCustomers_AfterRowActivate(object sender, EventArgs e)
{
MessageBox.Show(this.ultraGrid_QuickBooksCustomers.ActiveRow.Index.ToString());
}