I have a short list of values in a databound combobox (VS2005). The list contains a specific item that only certain users should be able to select. My question is how do I restore the old value if an unauthorized users tries to select this value I can do "e.Cancel - true" in the validating event but it still allows the value to be selected. I though maybe I could rebind or refresh just the control to get the previous value since I am using a binding source, but I don't know if refreshing one control is supported.
The other way I thought of was just excluding it from the adapter based on the users credentials in the form load event.
Any help is appreciated.

combobox restore previous value
scasti1
actually, since my combobox is bound using the following code, I just used a flag to check the users permissions and dropped the item from the list in needed:
DocumentDataSetTableAdapters.STAGETableAdapter STAGETableAdapter;
STAGETableAdapter = new DocumentDataSetTableAdapters.STAGETableAdapter();
STAGETableAdapter.Fill(this.documentDataSet.STAGE);
DataView dv = new DataView(this.documentDataSet.STAGE);
//drop the obsolete option
if (this._boolEditPermission == false)
{
dv.RowFilter = "ID <> 'OBSOLETE'";
}
this.ddlSTAGE.DataSource = dv;
this.ddlSTAGE.DisplayMember = "DESCRIPTION";
this.ddlSTAGE.ValueMember = "ID";
if (this.txtDOCUMENT_ID.Text.Length == 0)
{
this.ddlSTAGE.SelectedIndex = -1;
}
this.BindingContext[dv].SuspendBinding();
Claude Eisenhut
hi,
Is your problem solved If yes, then could you please mark it as answered and also post the answer. This will help other members of this forum too.
Thank you,
Bhanu.