protected Row DatatupleToRow(AbstractTuple dataTuple, int rowIndex)
{
Row row = new Row();
row.RowIndex = Convert.ToUInt32(rowIndex);
int columnIndex = 0;
columnIndex += offset;
// need to add this empty cell to add cells to the right place
row.AppendChild(GetEmptyCell(rowIndex, 0));
foreach (VariableIdentifier variableIdentifier in VariableIdentifiers)
{
VariableValue variableValue = dataTuple.VariableValues.Where(p => p.VariableId.Equals(variableIdentifier.id)).First();
Cell cell = VariableValueToCell(variableValue, rowIndex, columnIndex);
row.AppendChild(cell);
}
return row;
}