Hi,
I want to make a value list for a unique value column.
For example, if the user added one row with the value "1", and the value list contains "1", "2" and "3", in the next blank row I want the list to show only "2" and "3".
I used the BeforeCellListDropDown event to copy the value list items from the column and populate the cell value list with the values that don't show in any row.
The problem is that the list is not dropped down, probably because setting the value list cancels the event.
Here is the code I wrote in the BeforeCellListDropDown event:
ValueList cellList = DisplayLayout.ValueLists.Add();
{
bool valueFound = false;
row.Cells[e.Cell.Column.Index].Value.Equals(valueListItem.DataValue))
valueFound = true;
}
cellList.ValueListItems.Add(valueListItem.DataValue, valueListItem.DisplayText);
e.Cell.ValueList = cellList;
Try using the BeforeCellActivate event instead of BeforeCellListDropDown.
That works, thanks.