I have a grid whose data source has a column that is Bit (bool). In my InitializeLayout I check for the column and set the CellDisplayStyle to CellDisplayStyle.PlainText. This results in either true or false. I would like yes or no... How can I do this?
Hello,
You could define a ValueList and set the ValueList property of the column when the grid is initialized. I attached a sample demonstrating this.
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["Bool"].ValueList=vl; }
Let me know if you have any questions regarding this matter.