Is there a possibility to change the visible value of a cell without changing the real value? Something like
if cell.value.equals("F") then
cell.displayValue = "Female"
end if
Thanks for any support.
Hi,
In a simple case like your example where you have a finite list of options (M or F) and you want to show more user-friendly test, then easiest way to do this would be to use a ValueList.
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; ValueList vl = layout.ValueLists.Add("MF ValueList"); vl.ValueListItems.Add("M", "Male"); vl.ValueListItems.Add("F", "Female"); band.Columns["String 1"].ValueList = vl; band.Columns["String 1"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; }
You could also use UltraDropdown or a BindableValueList is your list data comes from a data source and you want to bind it.
The last line (setting the Style property) is optional, but I assume in a case of M/F you don't want the user to type in some other value.
Thank you for your answer. Because we provide a "Read-Only" grid, we don't want to have any "Drop-Down etc. controls" in our grid, but of course, this would be a solution.
Actually, we found our own way by implementing a "Draw-Filter", but this is a little bit complicated for such a simple "desire".
Anyway, it's some kind of disappointing, because other companies offer this addiotional "Display-Value" property. In my opinion, this would also be a very handy feature for the infragistics grid.