Hello,
I am trying to format a cell. I am returning a Boolean value and instead of displaying a true or false in the cell I want to display a 1 for true and a 0 for false. I have this in the cell formatting event and I have two columns, the first returns the true/false value which I am reading and then displaying the 1,0 in another column. It works fin when the true/false column is visible but when I hide it I do not see the 1,0 in the other column.
Here is what I have:
//Cell formatting for start bit visual indication. The Start column has been hidden.
if (e.CellElement.ColumnInfo.HeaderText == "Start")
{
if ((bool)e.CellElement.RowInfo.Cells["Start"].Value == true)
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "1";
}
else
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "0";
}
}
Can this be done in the expression editor for the true/false column or what is the best way to achieve this.
Thank you,
chom
I am trying to format a cell. I am returning a Boolean value and instead of displaying a true or false in the cell I want to display a 1 for true and a 0 for false. I have this in the cell formatting event and I have two columns, the first returns the true/false value which I am reading and then displaying the 1,0 in another column. It works fin when the true/false column is visible but when I hide it I do not see the 1,0 in the other column.
Here is what I have:
//Cell formatting for start bit visual indication. The Start column has been hidden.
if (e.CellElement.ColumnInfo.HeaderText == "Start")
{
if ((bool)e.CellElement.RowInfo.Cells["Start"].Value == true)
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "1";
}
else
{
e.CellElement.RowInfo.Cells["StartBit"].Value = "0";
}
}
Can this be done in the expression editor for the true/false column or what is the best way to achieve this.
Thank you,
chom