Reputation: 12126
I have an Infragistics UltraWinGrid bound to a data source, and one of the columns in that data source contains boolean values. I have the Style
property for the column set to Edit
so that it will display text instead of a checkbox. However, instead of displaying the values True
or False
, I want it to display Yes
or No
.
How do I format the value of the cell to display Yes or No for a boolean value?
Upvotes: 2
Views: 2564
Reputation: 216323
You could define a ValueList and set the ValueList property of the column
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
ValueList vl=new ValueList();
vl.ValueListItems.Add(true, "Yes");
vl.ValueListItems.Add(false, "No");
e.Layout.Bands[0].Columns["ColumnBoolean"].ValueList=vl;
}
Upvotes: 3