private void InitializeValueDisplay()
 {
     if (VariableToEdit is VariableScalar)
     {
         tlsOptionsList.Visible  = false;
         tlsOptionsTable.Visible = false;
         DataGridViewColumn col = CreateNewColumn("col1", I18n.Translate("internal/VariableEditorForm/colvalue", "Value"));
         col.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         dgvVariableData.Columns.Add(col);
         dgvVariableData.RowCount          = 1;
         dgvVariableData.RowHeadersVisible = false;
     }
     else if (VariableToEdit is VariableList)
     {
         tlsOptionsList.Visible  = true;
         tlsOptionsTable.Visible = false;
         VariableList       v   = (VariableList)VariableToEdit;
         DataGridViewColumn col = CreateNewColumn("col1", I18n.Translate("internal/VariableEditorForm/colvalue", "Value"));
         col.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
         dgvVariableData.Columns.Add(col);
         dgvVariableData.RowCount = v.Size();
         RenumberRows();
         dgvVariableData.RowHeadersVisible = true;
     }
     else if (VariableToEdit is VariableTable)
     {
         tlsOptionsList.Visible  = false;
         tlsOptionsTable.Visible = true;
         VariableTable v = (VariableTable)VariableToEdit;
         for (int x = 0; x < v.Width; x++)
         {
             DataGridViewColumn col = CreateNewColumn("col" + (x + 1), (x + 1).ToString());
             dgvVariableData.Columns.Add(col);
         }
         dgvVariableData.RowCount = v.Height;
         RenumberRows();
         dgvVariableData.RowHeadersVisible = true;
     }
 }