public void UpdateDisplay(string variableId)
 {
     string[] components = variableId.Split('_');
     if (components.Length == 3)
     {
         SpreadsheetComponentCell cell = GetComponentCell(variableId);
         if (cell != null)
         {
             cell.UpdateDisplay();
         }
     }
     else if (components.Length == 2)
     {
         // column / row header
         if (components[1][0] == 'c')
         {
             string columnId = components[1].Substring(1);
             int    col      = data.GetColumnIndexFromColumnId(columnId);
             UpdateColumn(col);
         }
         else if (components[1][0] == 'r')
         {
             string rowId = components[1].Substring(1);
             int    row   = data.GetRowIndexFromRowId(rowId);
             UpdateRow(row);
         }
     }
 }
        void UpdateRow(int row)
        {
            DataGridRow gridRow = grid.GetRow(row);

            if (gridRow == null)
            {
                return;
            }
            if (data.rowDatas[row].HasCustomLabel())
            {
                gridRow.Header = data.rowDatas[row].label;
            }
            else
            {
                gridRow.Header = "";
                gridRow.Header = GetRowName(row);
            }
            for (int col = 0; col < grid.Columns.Count; col++)
            {
                DataGridCell cell = grid.GetCell(row, col);
                if (cell != null)
                {
                    SpreadsheetComponentCell component = cell.Content as SpreadsheetComponentCell;
                    component.UpdateDisplay();
                }
            }
            gridRow.Tag = data.rowDatas[row].HasExpression();        // use Tag to store IsReadOnly information
        }