Hi,
I have a cell to which a value list is assigned with values from an enum.
The cell works fine if it's a dropdown.
However, when I set the style property to a dropdownlist, i get the following error after selecting a value and trying to go to the next cell or row:
Data Error
Unable to update the data value: Value in the editor is not valid.
Am I doing something wrong here?
Thanks,
I'm afraid that nothing in that code stands out to me as causing an issue, since the 'Right' column should be a string by default, and I would think that your ValueList does not have a problem converting its values as such. You should submit a small sample to Developer Support so that they can look into it.
-Matt
Here's the code from the InitializeLayout event for the grid.
e.Layout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
e.Layout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.False;
e.Layout.Override.AllowColSizing = Infragistics.Win.UltraWinGrid.AllowColSizing.Default;
e.Layout.Override.SelectTypeGroupByRow = Infragistics.Win.UltraWinGrid.SelectType.None;
e.Layout.GroupByBox.Hidden = true;
Infragistics.Win.ValueList list = CustomNybbles.Common.ControlHelper.GetValueListFromEnum<FeedbackCore.Security.Rights>(string.Empty); (string.empty just means to not put a default empty value in the list.)
e.Layout.Bands[0].Columns.Add("Read");
e.Layout.Bands[0].Columns.Add("Add");
{
col.Hidden = true;
col.ValueList = list;
col.GroupByMode = Infragistics.Win.UltraWinGrid.GroupByMode.Text;
}
col.DataType = typeof(bool);
col.Hidden = false;
col.DefaultCellValue = false;
I'm not sure what could be causing the issue here if it works perfectly fine if you have the Style simply set to DropDown; from the sound of it, the DataValue of an individual ValueListItem isn't able to be committed to the cell. Could you attach a small sample to your post so that I can see what you're doing?