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;
With e.Cell If .Column.Key = "ColumnName" Then .ValueList = GetValueList(.Text) e.Cancel = True End IfEnd With
End Sub
This is .NET 1.1 code, that was working with v3.1 (sic), we just migrate to v7.1 with hotfix 1071 (last .NET 1.1 version I found).Is there some known regression / some known workaround?
Regards,
Gilles
That works, thanks.
Try using the BeforeCellActivate event instead of BeforeCellListDropDown.