In this example the column # 3 contains boolean value you want to render as
"Yes/No"
private void myGrid_PreRender(object sender, System.EventArgs e)
{
// apply PreRender rules to every row
foreach (DataGridItem item in (sender as DataGrid).Items)
{
if (item.Cells[3].Text.ToUpper() == "TRUE")
item.Cells[3].Text = "Yes";
else
item.Cells[3].Text = "No";
}
}
Eliyahu
SStory said:
could you show me a little code please?
Thanks for the reply,
Shane
You can use PreRender event to go through all items and replace true/false
with yes/no.
Eliyahu
Is there a way to change the formatting expression of a column in the
property builder of the datagrid to make boolean values appear as yes/no
instead of true/false?
thanks,
shane