Home - Forums-.NET - FlyGrid.Net (Windows Forms) - how to remove items in lookuplist column

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

how to remove items in lookuplist column
Link Posted: 18-Jan-2006 23:53
hello,

I have a column of type lookuplist column bound to a datatable. I have a display member and a value member.
I'd like to remove records from the list when they have already been selected in other rows. That way the user cannot select the same item twice. I can't do that on the datatable level because if I remove an item from the datatable, the grid will show it's value member instead of the display member.
How can I do that properly?

Thank you
Link Posted: 19-Jan-2006 02:34
You can create your own extendedLookupListColumn inherited from LookupListColumn and override
GetValueList(NodeBase node) method:

public override object[] GetValueList(NodeBase node)
{
  object[] list = base.GetValueList(node);
  //here you can delete certain values from list
  //....
  return list;
}