public override TestElement Deserialize(Page page, bool isCopy = false)
        {
            if (isCopy)
            {
                Name = page.ParentTest.GetFreeName(Name);
            }
            ItemSet itemSet = new ItemSet(Name, page, GridPosition, GridSize);

            itemSet.Border = Border;
            itemSet.Role   = Role;

            itemSet.AlternativesNaming = AlternativesNaming;
            foreach (string str in Alternatives)
            {
                itemSet.AddAlternative(str);
            }

            itemSet.ItemsNaming = ItemsNaming;
            foreach (Item it in Items)
            {
                itemSet.AddItem(it);
            }

            itemSet.NumberOfCheckedAlternativesAllowed = NumberOfCheckedAlternativesAllowed;

            itemSet.ApplyScoreTooManyAlternatives        = ApplyScoreTooManyAlternatives;
            itemSet.ScoreIfTooManyAlternativesAreChecked = ScoreIfTooManyAlternativesAreChecked;

            itemSet.Description = Description;
            itemSet.Columns     = Columns;

            return(itemSet);
        }
 private void menuHeadersInsert(object sender, EventArgs e)
 {
     if (dataGrid.SelectedRows.Count == 1)
     {
         ItemSet.AddItem(new Item(), dataGrid.SelectedRows[0].Index - 1);
         FillGrid();
     }
     else if (dataGrid.SelectedColumns.Count == 1)
     {
         ItemSet.AddAlternative("", dataGrid.SelectedColumns[0].Index - 1);
         FillGrid();
     }
 }