Posted 14 November 2017, 4:36 am EST
I have a bound FlexGrid with a few columns that I would like to be unbound, where I manually set the value. Using the GridCellFactory’s “BindCellContent” method, I can set the value quite easily.
public override void BindCellContent(GridCellType cellType, GridCellRange range, View cellContent)
{
base.BindCellContent(cellType, range, cellContent);
if (cellType == GridCellType.Cell)
{
if (cellContent is Label label)
{
label.Text = "Test";
}
}
}
However, I cannot figure out how to retrieve that value I set. “GetCellText” and “GetCellValue” get me the bound value of the cell. So if I set a binding on the column, I get back that original value. If I don’t set a binding on the column, I get the entire data item. I would expect this line to get me back the string “Test”.
var text = MyGrid.GetCellText(cellRange);